Management API Swagger
# package-development
n
When doing Package Dev where API's are being added... are people just appending them to the Management API section of Swagger or setting up their own "Swagger API Definition" (sorry don't know the right terminology?
r
I've tried it both ways in different packages, but I can't see many pros or cons really! Maybe the only downside if you add it to the existing Management API is that you're doubling up on any generated JS clients that will exist in your project AND the
@umbraco-cms/backoffice
npm package
r
I add it to my own, mainlyn for visibility and since I don't support a public api anyway it's quite easy to remove before releasing the package
n
That's what I noticed when I was reading over the links you sent me on Mastadon so last night was reading up on how you could do a custom one. Just wondered what others were doing with regards to that as well 🙂 --- fyi those links you sent me are awsome btw.
Interesting, when you say you remove it before releasing, is that removing it from the Swagger bit you mean?
r
yes indeed from the swagger I only need it to generate TypeScript models
and API
w
Yep custom OpenAPI spec
Just separation of concerns and that my TS generated API doesnt contain anythjing else by mistake and for package consumers they have a nice new Swagger/openapi spec to test out in isolation away from their own custom code
3 Views