Skip to content

Instantly share code, notes, and snippets.

@curtisj44
Created September 1, 2021 17:53
Show Gist options
  • Select an option

  • Save curtisj44/a658ebc9e61fa85432c04c9c9e5b65a7 to your computer and use it in GitHub Desktop.

Select an option

Save curtisj44/a658ebc9e61fa85432c04c9c9e5b65a7 to your computer and use it in GitHub Desktop.

Revisions

  1. curtisj44 created this gist Sep 1, 2021.
    55 changes: 55 additions & 0 deletions sample-swagger.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,55 @@
    info:
    title: test
    version: 1.0.0
    consumes:
    - application/json
    produces:
    - application/json
    swagger: '2.0'
    securityDefinitions:
    keystone:
    description: OpenStack Keystone Authentication
    type: apiKey
    in: header
    name: x-auth-token

    security: []

    paths:
    /api/v1/clusters/:
    get:
    operationId: ListClusters
    summary: List available clusters
    responses:
    200:
    description: OK
    schema:
    type: array
    items:
    $ref: '#/definitions/Cluster'
    security:
    - keystone: []
    post:
    operationId: CreateCluster
    summary: Create a cluster
    responses:
    200:
    description: OK
    schema:
    $ref: '#/definitions/Cluster'
    parameters:
    - name: body
    in: body
    required: true
    schema:
    $ref: '#/definitions/Cluster'
    security:
    - keystone: []

    definitions:
    Cluster:
    type: object
    properties:
    name:
    description: name of the cluster
    type: string