0

I'm using Swagger UI with Fiber in Go. As far as I know, Swagger can configure array [string] in this way. The current form requires entering enum in advance, and I want to add it as a script. Is there a way?

Can I dynamically add Swagger UI parameters scheme in the Go script?

enter image description here

paths:
  /test:
    get:
      parameters:
        - in: query
          name: tag
          schema:
            type: string
            default: none
            enum:
              - available
              - pending
              - sold
              
dpa456
  • 27
  • 5
  • "The current form requires entering enum in advance, and I want to add it as a script. Is there a way?" -- what do you mean by this? – Jessie Dec 31 '21 at 07:51
  • For example, you must enter an enum value in advance to create the select box. I added a script to the text above. (must enter it directly into swagger.yaml.) – dpa456 Dec 31 '21 at 08:01

0 Answers0