Files
ziti/specs/source/shared/specs.yml
T
Andrew Martinez b562fb5c07 splits API specs into composible modules
- splits Open API 2.0 (swagger) into client/management APIs
- uses go-swaggers flatten capabilities
- uses newer version of go-swagger (v0.27.0)
- introduces /edge/client/v1, /edge/management/v1
- non-prefixed URLs default to /edge/client/v1
- splits some shared management/client API handlers
- renames some REST models to "client" instead of "limited"
- passes all apitests, fails dataflow upd test (main fails this as well)
- updates generate rest script for powershell
- todo: test generate rest script for bash
- todo: use xweb (different branch)
2021-05-04 11:30:32 -04:00

105 lines
2.5 KiB
YAML

---
paths:
specs:
get:
summary: Returns a list of API specs
description: Returns a list of spec files embedded within the controller for consumption/documentation/code geneartion
security: [ ]
tags:
- Informational
operationId: listSpecs
responses:
'200':
$ref: '#/responses/listSpecs'
specs-id:
parameters:
- $ref: 'parameters.yml#/id'
get:
summary: Return a single spec resource
description: Returns single spec resource embedded within the controller for consumption/documentation/code geneartion
security: [ ]
tags:
- Informational
operationId: detailSpec
responses:
'200':
$ref: '#/responses/detailSpec'
specs-id-spec:
parameters:
- $ref: 'parameters.yml#/id'
get:
summary: Returns the spec's file
description: Return the body of the specification (i.e. Swagger, OpenAPI 2.0, 3.0, etc).
security: [ ]
tags:
- Informational
operationId: detailSpecBody
produces:
- text/yaml
- application/json
responses:
'200':
$ref: '#/responses/detailSpecBody'
responses:
listSpecs:
description: A list of specifications
schema:
$ref: '#/definitions/listSpecsEnvelope'
detailSpec:
description: A single specification
schema:
$ref: '#/definitions/detailSpecEnvelope'
detailSpecBody:
description: Returns the document that represents the specification
schema:
$ref: '#/definitions/detailSpecBodyEnvelope'
definitions:
listSpecsEnvelope:
type: object
required:
- meta
- data
properties:
meta:
$ref: 'standard-responses.yml#/definitions/meta'
data:
$ref: '#/definitions/specList'
detailSpecEnvelope:
type: object
required:
- meta
- data
properties:
meta:
$ref: 'standard-responses.yml#/definitions/meta'
data:
$ref: '#/definitions/specDetail'
detailSpecBodyEnvelope:
type: object
required:
- meta
- data
properties:
meta:
$ref: 'standard-responses.yml#/definitions/meta'
data:
$ref: '#/definitions/specBodyDetail'
specList:
type: array
items:
$ref: '#/definitions/specDetail'
specDetail:
type: object
allOf:
- $ref: 'base-entity.yml#/definitions/baseEntity'
- type: object
required:
- name
properties:
name:
type: string
specBodyDetail:
type: string