github.com/go-swagger/go-swagger@v0.31.0/docs/reference/annotations/meta.md (about)

     1  ---
     2  title: meta
     3  date: 2023-01-01T01:01:01-08:00
     4  draft: true
     5  ---
     6  # swagger:meta
     7  
     8  The **swagger:meta** annotation flags a file as source for metadata about the API.
     9  This is typically a doc.go file with your package documentation.
    10  
    11  You can specify a Consumes and Produces key which has a new content type on each line
    12  Schemes is a tag that is required and allows for a comma separated string composed of:
    13  http, https, ws or wss
    14  
    15  Host and BasePath can be specified but those values will be defaults,
    16  they should get substituted when serving the swagger spec.
    17  
    18  The description property uses the rest of the comment block as description for the api when not explicitly provided
    19  
    20  ##### Syntax
    21  
    22  ```go
    23  swagger:meta
    24  ```
    25  
    26  ##### Properties
    27  
    28  Annotation | Format
    29  swagger: '2.0'
    30  consumes:
    31    - application/json
    32    - application/xml
    33  produces:
    34    - application/json
    35    - application/xml
    36  schemes:
    37    - http
    38    - https
    39  info:
    40    description: "the purpose of this application is to provide an application\nthat is using plain go code to define an API\n\nThis should demonstrate all the possible comment annotations\nthat are available to turn go code into a fully compliant swagger 2.0 spec"
    41    title: 'Petstore API.'
    42    termsOfService: 'there are no TOS at this moment, use at your own risk we take no responsibility'
    43    contact: {name: 'John Doe', url: 'http://john.doe.com', email: john.doe@example.com}
    44    license: {name: MIT, url: 'http://opensource.org/licenses/MIT'}
    45    version: 0.0.1
    46  host: localhost
    47  basePath: /v2
    48  x-meta-value: value
    49  x-meta-array:
    50    - value1
    51    - value2
    52  x-meta-array-obj:
    53    - name: obj
    54      value: field
    55  ```
    56  
    57  ##### Supported MIME types
    58  
    59  Consumes      | Produces