Multiple versions with different parameters from the same yaml file
I have an API documentation, which looks like this:
- $ref: '#/parameters/<parameter_1>'
- $ref: '#/parameters/<parameter_2>'
- $ref: '#/parameters/<parameter_3>'
The API is used by internal and external sources. We want to hide some parameters from the external sources. So in this example, what I want is to create 2 different HTML page from the same source code (yaml file):
"internal" HTML, which contains every parameter for the API endpoint
"external" HTML, which contains only some of the parameters for the API endpoit (in this case, it would only contain parameter_1 and parameter_3, but not parameter_2).
How can I do this without copy-pasting the same YAML code over and over again?