eclipse / microprofile-open-api

Microprofile open api
Apache License 2.0
131 stars 81 forks source link

Support extensions as nested annotations for extensible models #513

Closed MikeEdgar closed 2 years ago

MikeEdgar commented 2 years ago

Fixes #339 Fixes #387

MikeEdgar commented 2 years ago

We may want to add some additional TCK tests for some random selection of annotations.

Azquelt commented 2 years ago

Should we add the extensions array to the @Content annotation as well? As far as I can make out, it represents a key and value pair from the a content map. The value corresponds to a MediaType model object which is extensible.

MikeEdgar commented 2 years ago

Should we add the extensions array to the @Content annotation as well?

Yes, thanks for catching it.

Azquelt commented 2 years ago

Should we add extensions to @APIResponses? I think that's allowed even though it's a repeatable container for @APIResponse as long as it has a default value and the APIResponses model object is extensible.

Azquelt commented 2 years ago

I'm unsure whether we should add it to @APISchemaResponse or not. I think that corresponds to a Response but it's also already a shorthand and users who want to add extensions could use the full @APIResponse instead.

MikeEdgar commented 2 years ago

it's also already a shorthand and users who want to add extensions could use the full @APIResponse instead

That's my thinking as well.