Skip to content

Conversation

@Hajime-san
Copy link

@Hajime-san Hajime-san commented Dec 22, 2025

Summary

I think this proposal #8148 is an effective approach for concisely and flexibly defining response descriptions in OpenAPI documents from TypeSpecs.
It also mentions that inline decorators are not syntactically valid. While it is possible to implement that, the tradeoff with complexity is that inline doc comments are sufficient.

closes #8148

Changes

To achieve this functionality, I made the following changes:

  • Parse inline doc comments in compiler
  • Associate parsed inline doc comments with response descriptions in http
  • Change formatter behavior to improve the readability of inline doc comments compiler/formatter
  • documentation for website about this feature and ordering of what doc will be adopted in website

Please let me know if I've missed any, as I think it covers most use cases.

Associating inline doc comments in tsp-openapi3 will also make it easier to migrate from OpenAPI documents.
The feature itself doesn't require much code, but it would be numerous changes to test code, so I haven't included it in this PR.
If the team finds this feature useful, I will consider submitting it as a separate PR.

- give meaning to inline block comment in response description
@Hajime-san
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow adding inline descriptions/documentation to response unions

1 participant