apigitlabs / apigit-support

APIGIT is a native Git based collaboration platform for API design, document, mock and share.
https://apigit.com
3 stars 0 forks source link

OpenAPI extensions should be included in the UI #36

Closed Stwissel closed 2 weeks ago

Stwissel commented 4 weeks ago

Is there an existing request for this feature?

Is your feature request related to a problem?

We use x-extensions to configure our API, they are not visible in the edit form or the preview

Describe the solution you'd like

OpenAPI allows extensions:

When added to the OpenAPI source code, they are preserved, but they are not visible anywhere in form or preview which makes them hard to use. Has been solved in other GUIs:

Screenshot 2024-11-05 at 17 05 21

P.S.: Love your work!

Describe alternatives you've considered

Use apicur.io to cross check

Additional context

No response

apigitlabs commented 4 weeks ago

hi @Stwissel ,

Thank you for highlighting this requirement. We understand the need to support the OpenAPI x-extension. However, it was initially a lower priority for us as this extension is quite vendor-specific and can appear at various levels within the OpenAPI specification. Our code editor currently has the flexibility to support it in any configuration.

Could you share more about where exactly you plan to use the extension in your spec? For instance, is it at the root, path, operation, or schema level? If this is a common use case, we could prioritize implementing quick support for it ahead of a full extension rollout in the form editor.

Stwissel commented 4 weeks ago

We use x-roles on the method level to define the roles for RBAC. That's our current use. We used other x-... flags on the path level and inside info before. It is quite common (e.g https://www.npmjs.com/package/express-openapi-validator )

apigitlabs commented 4 weeks ago

thanks @Stwissel for the quick response and valuable suggestion, we will take a look and let you know if there is any update.

Stwissel commented 3 weeks ago

A big step would be just show them in form mode, so they can be seen. For editing the source mode would do.

apigitlabs commented 3 weeks ago

thanks @Stwissel , per your request, we have get it supported in spec info and spec method level. please refresh browser to take a look if it match your expect.

Stwissel commented 3 weeks ago

You people are awesome. Some finishing touches needed:

I checked, current Swagger does display extensions, so it might just need a library update. image

ReDoc doesn't seem to show, so I would put that on low priority until upstream provides

apigitlabs commented 3 weeks ago

thanks @Stwissel , it is a configuration on Swagger ui, we have added it support. please refresh browser to have a try.

apigitlabs commented 2 weeks ago

hi @Stwissel , can you let me know if everything work well for you ?

Stwissel commented 2 weeks ago

all good, you people are awesome