You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[fix] Apply REMOVE_X_INTERNAL normalizer to nested inline properties (#22097)
* fix: Apply REMOVE_X_INTERNAL normalizer to nested inline properties
When REMOVE_X_INTERNAL=true is set, the normalizer removes the x-internal
extension from top-level schemas in components/schemas but fails to remove
it from inline object properties within those schemas.
This causes issues when:
1. A schema is imported cross-file (e.g., admin.yaml imports from chat.yaml)
2. That schema has an inline object property with x-internal: true
3. The inline property has type: object with nested properties
Result: TypeScript generator creates a type reference but no interface
definition, causing compilation errors.
This fix applies the same x-internal removal logic to normalizeProperties()
that already exists in normalizeComponentsSchemas(), ensuring inline
properties are handled consistently.
Fixes behavior for inline schemas with x-internal in cross-file imports.
* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java
Co-authored-by: Copilot <[email protected]>
* test: Add test case for REMOVE_X_INTERNAL with inline properties
Adds test to verify that REMOVE_X_INTERNAL normalizer correctly removes
x-internal extension from inline object properties, not just top-level schemas.
* Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
* Revert "Apply suggestion from @Copilot"
This reverts commit c899e9e.
---------
Co-authored-by: Copilot <[email protected]>
0 commit comments