is it possible to dynamically get an API description ?

Options

Hi,
i'd like to know if it's possible to get all the details of an API endpoints dynamically ?

ie : passing a specific parameter to the end point to get it's description ? As a swagger doc but from a specific API endpoint call.

Thanks for your answer !

Best regards,

Guillaume

Best Answer

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Answer ✓
    Options

    So what I would do is make an endpoint in Xano for this. Have the endpoint call the Xano OpenAPI spec endpoint (the "apispec" link under the title in your swagger page) for your app. Load that into an object with yaml_decode, and then return the member for the particular endpoint you are interested in (presumably passed as an argument to our endpoint). This would generate JSON for the shape relatively straightforwardly.

Answers