89 lines
2.1 KiB
YAML
Raw Normal View History

2021-11-18 19:27:39 +01:00
openapi: 3.0.0
info:
title: Generic Database API Service
2021-11-18 19:27:39 +01:00
version: "0.0.2"
paths:
/pdb/v2/test1:
get:
tags: [ "Regular" ]
operationId: Regular.test1all
summary: Returns all entries from table test1
responses:
200:
description: Here are your test1 items
content:
application/json:
schema:
type: array
items:
2021-11-19 12:39:46 +01:00
$ref: "#/components/schemas/test1"
2021-11-18 19:27:39 +01:00
404:
description: No test1 items available
2021-11-19 12:39:46 +01:00
# post:
# tags: [ "Regular" ]
# operationId: Regular.test1insert
# summary: Inserts an item into table test1
# requestBody:
# description: test1
# content:
# application/json:
# schema:
# $ref: "#/components/schemas/test1"
# responses:
# 201:
# description: Your items has been inserted
2021-11-25 14:54:18 +01:00
/pdb/v2/test1/specificSelectName/{nr}:
2021-11-19 12:39:46 +01:00
get:
tags: [ "Regular" ]
operationId: Regular.test1specificSelectName
summary: Returns entries from table test1 using a dedicated select statement
description:
STATEMENTBEGIN
select txt
from test1
2021-11-25 14:49:08 +01:00
where nr = @nr
2021-11-19 12:39:46 +01:00
STATEMENTEND
2021-11-23 18:38:08 +01:00
INPUTMAPPINGBEGIN
nr = Nummer
INPUTMAPPINGEND
2021-11-25 14:49:08 +01:00
parameters:
- name: nr
2021-11-25 14:54:18 +01:00
in: path
2021-11-25 14:49:08 +01:00
required: true
schema:
type: integer
2021-11-19 12:39:46 +01:00
responses:
200:
description: Here are your test1 items
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/specificResultType"
2021-11-18 19:27:39 +01:00
404:
description: No such test1 item available
components:
schemas:
2021-11-19 12:39:46 +01:00
test1:
2021-11-18 19:27:39 +01:00
description: A test1 item
type: object
required:
- id
properties:
id:
type: integer
txt:
type: string
nr:
type: integer
2021-11-19 12:39:46 +01:00
specificResultType:
description: Specific result type to defintion select clause
type: object
properties:
txt:
type: string