Forum Discussion

prnudja's avatar
prnudja
Occasional Visitor
8 months ago

Setting Server Template variables at runtime

I have a Spring Boot application using openapi 3 with the api defined in the file appapi.yaml.

I have declared a server template and the defaults work fine.

 

servers:
    - url: http://{env}:{port}/{path}
      variables:
          env:
              default: localhost
              description: The current environment
          port:
              enum:
                  - '8080'
                  - '8098'
              default: '8080'
          path:
              default: api

 

I am now trying to specify the template variables at runtime but I have not had any success - can this even be done and if so, how are they specified?

No RepliesBe the first to reply