Description
Before the changes introduced in PR #82, properties from ACF and WP Post properties that shared keys with "-" in their names were merged under the same key in the generated schema.
After the changes in this PR, instead of merging under the same key, a new separate key is added specifically for the WP Post properties.
Example for before
{
"components": {
"schemas": {
"foo-bar": {
"title": "Foo Bar",
"type": "object",
"properties": {
// WP Core
"slug": {
"description": "An alphanumeric identifier for the post unique to its type.",
"type": "string"
},
"title": { ... },
...
// ACF
"topper": { ...},
"credits": { ... }
}
}
}
}
Example for after
Observe how what was unified under foo-bar before, now separated under two keys foo-bar and foo_bar
{
"components": {
"schemas": {
// WP Core
"foo_bar": {
"title": "Foo Bar",
"type": "object",
"properties": {
"slug": {
"description": "An alphanumeric identifier for the post unique to its type.",
"type": "string"
},
"title": { ... },
},
// ACF
"foo-bar": {
"topper": { ... },
"credits": { ... }
}
}
}
}
Expected Behavior
Previously, both ACF and WP Post properties with matching keys (including those containing "-") were included together under a single schema key (e.g., "foo-bar"). This merging made it possible to interact with all related fields in one place.
Actual Behavior
After PR #82, these properties are now split into separate schema entries, such as "foo-bar" for ACF and "foo_bar" for WP Core, resulting in fragmentation and possible breaking changes for users expecting the unified schema.
Description
Before the changes introduced in PR #82, properties from ACF and WP Post properties that shared keys with "-" in their names were merged under the same key in the generated schema.
After the changes in this PR, instead of merging under the same key, a new separate key is added specifically for the WP Post properties.
Example for before
{ "components": { "schemas": { "foo-bar": { "title": "Foo Bar", "type": "object", "properties": { // WP Core "slug": { "description": "An alphanumeric identifier for the post unique to its type.", "type": "string" }, "title": { ... }, ... // ACF "topper": { ...}, "credits": { ... } } } } }Example for after
Observe how what was unified under
foo-barbefore, now separated under two keysfoo-barandfoo_bar{ "components": { "schemas": { // WP Core "foo_bar": { "title": "Foo Bar", "type": "object", "properties": { "slug": { "description": "An alphanumeric identifier for the post unique to its type.", "type": "string" }, "title": { ... }, }, // ACF "foo-bar": { "topper": { ... }, "credits": { ... } } } } }Expected Behavior
Previously, both ACF and WP Post properties with matching keys (including those containing "-") were included together under a single schema key (e.g., "foo-bar"). This merging made it possible to interact with all related fields in one place.
Actual Behavior
After PR #82, these properties are now split into separate schema entries, such as "foo-bar" for ACF and "foo_bar" for WP Core, resulting in fragmentation and possible breaking changes for users expecting the unified schema.