microsoft / typespec

https://typespec.io/
MIT License
4.56k stars 223 forks source link

OpenAPI3 generates allOf for properties with references to another schema and a doc #2352

Closed bterlson closed 6 months ago

bterlson commented 1 year ago

Playground

Is this necessary? I could see it being necessary for a some $ref semantics, but I don't see this being used in the wild, so I suspect tools will be fine without the allOf

mikekistler commented 1 year ago

I think the Spectral linter will complain if the $ref is not wrapped in allOf.

https://meta.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules#no-ref-siblings