One of the advantages of well-known, open standard formats is the tooling provided by the community. Swagger is supported by many tools. One of these is the official Swagger-UI that is available as Docker Image swaggerapi/swagger-ui.
Documentation
If you want to see a pretty (and interactive!) documentation for you API definition, start the UI server on your local machine like this:
The command line assumes that you are in your project directory and the API definition is in ./swagger.yml. If you have a swagger.json or any other name, simply change the part left of the colon (:) in the -v argument, such as -v $(pwd)/swagger.json:/swagger.yaml.
Interactive Mode
The Swagger UI features a Try it out! function that creates API calls for you. You can either copy and paste the curl command lines provided, or even perform the fetch right in the browser.
To make that work, however, you need to have host and scheme settings in your API definition. Your swagger.yml could start like this: