eclipse / microprofile-open-api

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

Only require the endpoint when an OpenAPI document can be generated #526

Closed Azquelt closed 2 years ago

Azquelt commented 2 years ago

This allows the endpoint not to be served if the user isn't deploying an application which uses Jakarta RESTful WS and hasn't supplied an OpenAPI document in another way.

The auto-formatter wants to reformat the changes from #525 so I've included that as a separate commit.

Fixes #413

MikeEdgar commented 2 years ago

@pferraro - please take a look. Thanks

pferraro commented 2 years ago

@MikeEdgar Are the requisite TCK changes meant to be part of this commit?

Azquelt commented 2 years ago

I don't think there are any TCK changes needed here. This change is a loosening of the spec to allow implementers to not start the /openapi endpoint if there wouldn't be any content to show on it.

pferraro commented 2 years ago

@Azquelt You are correct. The tests identified in https://github.com/eclipse/microprofile-open-api/issues/413 match at least of one of the criteria you've identified.