How to add configurable field in Open Api specification?

20 Views Asked by At

I have Open Api Spec yaml like this

openapi: 3.0.1
info:
  title: Some Service
  version: ${project.version}
  description: desc
servers:
  - url: http://localhost:8080
    description: Local server URL
paths:
  /v2/validation/{id}:
    get:
      tags:
        - validation
      operationId: validateEntity
      parameters:
        - name: id
          in: query
          required: true
        - country:
            type: string
              enum:
              - GB
              - USA
      responses:
        '200':
          description: OK

So, I have made some custom Validator class which is pulling pattern for validation from HOCON file. How I can apply that to this enum? Should I use mustache file or there is other solution? So, I need somehow to apply that pattern validator to this yaml file(for this enum concrete)

0

There are 0 best solutions below