Skip to content

Add support for summary and kind in tagMetadata decorator #10768

@baywet

Description

@baywet

Clear and concise description of the problem

I'd like to be able to specify the tag kind and summary from TypeSpec so it's present in my OpenAPI 3.2.0 description.

@tagMetadata("foo", #{kind: "FooGroup", summary: "all operations that allow doing Foo" })

Should result in

tags:
- name: foo
  summary: "all operations that allow doing Foo" 
  kind: FooGroup

For OpenAPI 3.2.0 (those fields were added with this version)

For earlier versions of OpenAPI, we should add a x-oai- prefix to the fields, so it'll result in something like this.

tags:
- name: foo
  x-oai-summary: "all operations that allow doing Foo" 
  x-oai-kind: FooGroup

For any documentation comment of the newly added API surface:

  • summary: "A short summary of the tag, used for display purposes."
  • kind: "A machine-readable string to categorize what sort of tag it is. Any string value can be used"

The converter should also support importing those values from OpenAPI to TypeSpec to provide symmetry in the experience.

Checklist

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Metadata

Metadata

Assignees

Labels

emitter:openapi3Issues for @typespec/openapi3 emitterlib:openapiopenapi3:converterIssues for @typespec/openapi3 openapi to typespec converter
No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions