0

There are lengthy code examples inside the swagger doc we have.

Is there a way to put them outside or separate and just reference them via alias or something?

I need to use them inside a description e.g. for the lack of a better place:

my-swagger.yaml

  /myapi-endpoint:
    get:
      tags: [Mytag]
      summary: My summary 
      description: |
        Php example code
        ```php
        <?php
            //my very long php code example...
        
Toskan
  • 13,911
  • 14
  • 95
  • 185
  • Does this answer your question? [How to reference OpenAPI operation description from an external file](https://stackoverflow.com/q/74297572/113116) – Helen Feb 28 '23 at 11:27
  • I've seen that you can reference external files. The problem is now that you cannot concatenate that content to something else: https://stackoverflow.com/a/5954748/533426 – Toskan Feb 28 '23 at 11:33

0 Answers0