Add support for OAS 3.2 nested tags via parent field in @tagMetadata#9577
Conversation
- Updated TagMetadata model to include parent field - Modified openapi.ts to convert parent to x-parent for 3.0/3.1 - Added comprehensive tests for all OpenAPI versions - Tests passing for parent field in 3.2, x-parent in 3.0/3.1 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
- Added example of nested tags using parent field - Rebuilt packages to update generated types Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
|
@copilot need to make sure you do a full build and commit the generated files. ANd run |
commit: |
- Changed from using 'as any' to a more type-safe approach - Use tag.parent from source TagMetadata to check parent existence - Only use type assertion on delete operation with explicit type Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
- Updated README.md with parent field example - Updated decorators.md with parent field example - Generated files from full build Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Done in c831ac7. Ran full build and Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot pull latest change from main and resolve merge conflicts |
- Integrated parent field conversion logic into refactored resolveDocumentTags function - Updated test imports to match main branch changes - Preserved parent field tests for all OpenAPI versions Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
|
@copilot run |
- Removed extra blank line in tagmetadata.test.ts Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Done in 6facdb9. Ran Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot please add changelog |
- Added feature changeset for @typespec/openapi and @typespec/openapi3 - Describes support for parent field in @tagMetadata decorator Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
|
You can try these changes here
|
Add support for OAS 3.2 Nested Tags
parentfield in decorators.tspparentfield nativelySummary
This PR adds support for OpenAPI 3.2 nested tags by introducing a
parentfield in the@tagMetadatadecorator.Changes: 8 files, 106 insertions, 8 deletions
The implementation correctly handles version differences:
parentfield nativelyparentfield entirely (not supported in these versions)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.