Skip to content

feat(json-schema): support x-additionalPropertiesName - #10006

Merged
cka121 merged 1 commit into
swagger-api:masterfrom
eltoder:ft/x-additionalPropertiesName
Jul 9, 2025
Merged

feat(json-schema): support x-additionalPropertiesName#10006
cka121 merged 1 commit into
swagger-api:masterfrom
eltoder:ft/x-additionalPropertiesName

Conversation

@eltoder

@eltoder eltoder commented Jun 7, 2024

Copy link
Copy Markdown
Contributor

x-additionalPropertiesName is a Redocly extension to display more descriptive property names in objects with additionalProperties[1]. This allows generating nicer looking and more informative documentation and examples than Swagger UI's current "additionalProp" name.

[1] https://redocly.com/docs/api-reference-docs/specification-extensions/x-additional-properties-name/

My PR contains...

  • Features (non-breaking change which adds functionality)

My changes...

  • are not breaking changes.

Documentation

I haven't found the right place to document the change, but happy to add documentation if such a place exists.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@eltoder
eltoder force-pushed the ft/x-additionalPropertiesName branch from b7ccc38 to 43baa87 Compare June 7, 2024 23:02
@cka121

cka121 commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

@eltoder Please update your branch to align it with the base branch.

x-additionalPropertiesName is a Redocly extension to display more
descriptive property names in objects with additionalProperties[1].
This allows generating nicer looking and more informative documentation
and examples than Swagger UI's current "additionalProp" name.

[1] https://redocly.com/docs/api-reference-docs/specification-extensions/x-additional-properties-name/
@eltoder
eltoder force-pushed the ft/x-additionalPropertiesName branch from 43baa87 to 6bb0905 Compare July 8, 2025 15:56
@eltoder

eltoder commented Jul 8, 2025

Copy link
Copy Markdown
Contributor Author

@cka121 done

@cka121 cka121 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a feature to allow custom naming of additional properties in sample output (including XML) via the x-additionalPropertiesName extension. The implementation is consistent, covered by test cases, allowing default values ensuring backward-compatible, and improves flexibility in sample generation.

@cka121
cka121 merged commit 4bada92 into swagger-api:master Jul 9, 2025
7 checks passed
@eltoder
eltoder deleted the ft/x-additionalPropertiesName branch July 9, 2025 12:01
swagger-bot pushed a commit that referenced this pull request Jul 16, 2025
# [5.27.0](v5.26.2...v5.27.0) (2025-07-16)

### Bug Fixes

* permissions of files to allow running as non-root ([#10515](#10515)) ([679e73b](679e73b))
* sanitization of relative OpenAPI JSON paths ([#10528](#10528)) ([60dee8b](60dee8b))

### Features

* **json-schema:** support x-additionalPropertiesName ([#10006](#10006)) ([4bada92](4bada92))
@swagger-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

delendik-testops pushed a commit to ModiusOpenData/swagger-ui that referenced this pull request Mar 3, 2026
delendik-testops pushed a commit to ModiusOpenData/swagger-ui that referenced this pull request Mar 3, 2026
# [5.27.0](swagger-api/swagger-ui@v5.26.2...v5.27.0) (2025-07-16)

### Bug Fixes

* permissions of files to allow running as non-root ([swagger-api#10515](swagger-api#10515)) ([679e73b](swagger-api@679e73b))
* sanitization of relative OpenAPI JSON paths ([swagger-api#10528](swagger-api#10528)) ([60dee8b](swagger-api@60dee8b))

### Features

* **json-schema:** support x-additionalPropertiesName ([swagger-api#10006](swagger-api#10006)) ([4bada92](swagger-api@4bada92))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants