izard.joaswizard.0.9.0.source-code.fullCrud.yaml.hbs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of joaswizard Show documentation
Show all versions of joaswizard Show documentation
Jo as wizard helps to create an OAS3 specification including all CRUD operations from Yaml formatted text.
openapi: 3.0.2
info:
version: 1.0.0
title: {{capResource}} API
description: >-
This is an OpenAPI Specification created by Joaswizard (https://github.com/networkinss/joaswizard),
contact:
name: Oliver Glas
email: [email protected]
url: http://inss.ch
license:
name: Apache
url: http://opensource.org/licenses/Apache-2.0
servers:
- url: http://localhost:8080/v1
description: Local environment.
paths:
/{{lowerResources}}:
get:
description: Returns all {{resources}}
operationId: get{{capResources}}
responses:
'200':
description: {{capResource}} List
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/{{capResource}}'
'400':
description: Bad request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'500':
description: Unexpected internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
post:
description: Creates a new {{resource}}
operationId: add{{capResource}}
responses:
'201':
description: {{resource}} created
'400':
description: Bad request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'500':
description: Unexpected internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
requestBody:
x-name: {{resource}}
content:
application/json:
schema:
$ref: '#/components/schemas/{{capResource}}'
description: {{capResource}} to be created
required: true
/{{lowerResource}}/{{openCurlyBrace}}{{resourceId}}{{closeCurlyBrace}}:
get:
description: >-
Returns a {{resource}} by {{resourceId}}
operationId: find{{capResource}}By{{resourceId}}
parameters:
- name: {{resourceId}}
in: path
description: {{resourceId}} of {{resource}} to fetch
required: true
schema:
type: string
responses:
'200':
description: {{capResource}} returned
content:
application/json:
schema:
$ref: '#/components/schemas/{{capResource}}'
'400':
description: Bad request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'404':
description: Data with the specified ID was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'500':
description: Unexpected internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
delete:
description: deletes a single {{resource}} based on the {{resourceId}}
operationId: delete{{capResource}}
parameters:
- name: {{resourceId}}
in: path
description: ID of {{resource}} to delete
required: true
schema:
type: string
responses:
'204':
description: {{resource}} deleted
'400':
description: Bad request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'404':
description: Data with the specified ID was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'500':
description: Unexpected internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
put:
description: Update a {{resource}} based on its {{resourceId}}
operationId: update{{capResource}}
parameters:
- name: {{resourceId}}
in: path
description: ID of {{resource}} to put
required: true
schema:
type: string
responses:
'204':
description: {{resource}} updated
'400':
description: Bad request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'404':
description: Data with the specified ID was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
'500':
description: Unexpected internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
requestBody:
x-name: {{resource}}
content:
application/json:
schema:
$ref: '#/components/schemas/{{capResource}}'
description: {{capResource}} to be updated
required: true
components:
schemas:
ErrorModel:
type: object
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string