0

The API documentation created using OpenAPI is usually called using the endpoints /openapi (YAML) or /openapi/ui (Frontend). How can I rename these endpoints for that I can call e.g. /myappapi and /myappapi/ui respectively? (OpenAPI 3)

Helen
  • 87,344
  • 17
  • 243
  • 314

1 Answers1

1

This massively depends on how you're generating that OpenAPI. From your comment I see that you're using Eclipse MicroProfile and I've not come across that before, but a quick DuckDuckGo shows this extension might be what you're up to: https://github.com/eclipse/microprofile-open-api

I couldn't see any specific config options to change the endpoint, but you could always slap a nginx redirect in there.

If you're finding limitations with the way you're generating OpenAPI to be a problem, I recommend not doing that.

Of all the approaches: Annotations, DSL, writing YAML by hand in text-editors, or GUI's, I can't help but recommend the GUI approach as it allows for API Design First for new APIs and new functionality in old APIs.

I just did a huge talk about that: https://www.youtube.com/watch?v=nfkppuQ-Eg0&feature=youtu.be

Blog version: https://stoplight.io/blog/api-design-first-vs-code-first/

Otherwise, see if you can pick that extension apart and tweak the config options until it does whatever you want. :)

Phil Sturgeon
  • 30,637
  • 12
  • 78
  • 117