Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing decorators for OpenAPI3 emitter #3293

Open
Tracked by #3836
timotheeguerin opened this issue May 7, 2024 · 7 comments
Open
Tracked by #3836

Missing decorators for OpenAPI3 emitter #3293

timotheeguerin opened this issue May 7, 2024 · 7 comments
Assignees
Labels
emitter:openapi3 Issues for @typespec/openapi3 emitter feature New feature or request lib:openapi triaged:core
Milestone

Comments

@timotheeguerin
Copy link
Member

timotheeguerin commented May 7, 2024

Clear and concise description of the problem

  • multipleOf
  • uniqueItems
  • maxProperties
  • minProperties
@Arithmomaniac
Copy link

Arithmomaniac commented Sep 16, 2024

Sefaria uses both title and uniqueItems; neither of them are deal-breakers for their use of tsp-openapi3, but it prevents porting with perfect fidelity.

@timotheeguerin
Copy link
Member Author

title can be set with @summary, for uniqueItems there is no way around for now. The proposed plan was just to remove the x- resitrction on @extension to let any of those be specified without additional decorators

@Arithmomaniac
Copy link

Re @title: good to know, but is that documented anywhere?
The proposed solution for uniqueItems doesn't provide value validation the way e.g. @minValue does.

@timotheeguerin
Copy link
Member Author

Doesn't seem like it, and yeah that is unfortunate, the question was if we wanted to really add all those extra decorators only have the future openapi3.1 emitter that will use json schema decorators directly

@Arithmomaniac
Copy link

Is said future emitter even backlogged anywhere?
I would have thought that since you have jsonshema decorators already, it wouldn't be too much work to just copy them over. But I don't know how much they vary internally.

@timotheeguerin
Copy link
Member Author

#1698 and yeah its probably not hard and we didn't make any hard descision on using @extension it was more as an escape hatch

@wanlwanl
Copy link
Member

wanlwanl commented Nov 5, 2024

chrisradek is refactoring oas3 emitter to use json schema emitter, after that we can resue json schema's components to add these decorators easily

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:openapi3 Issues for @typespec/openapi3 emitter feature New feature or request lib:openapi triaged:core
Projects
None yet
Development

No branches or pull requests

5 participants