2021-11-18 19:27:39 +01:00
|
|
|
openapi: 3.0.0
|
|
|
|
|
|
|
|
info:
|
2021-11-22 19:07:46 +01:00
|
|
|
title: Generic Database API Service
|
2021-11-26 16:51:09 +01:00
|
|
|
version: "2.0.0"
|
2021-11-18 19:27:39 +01:00
|
|
|
|
|
|
|
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 15:44:16 +01:00
|
|
|
/pdb/v2/test1/specificSelectName/{txt}:
|
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
|
2021-11-25 15:44:16 +01:00
|
|
|
select nr, txt
|
2021-11-19 12:39:46 +01:00
|
|
|
from test1
|
2021-11-25 15:44:16 +01:00
|
|
|
where txt = @txt
|
2021-11-19 12:39:46 +01:00
|
|
|
STATEMENTEND
|
2021-11-25 14:49:08 +01:00
|
|
|
parameters:
|
2021-11-25 15:44:16 +01:00
|
|
|
- name: txt
|
2021-11-25 14:54:18 +01:00
|
|
|
in: path
|
2021-11-25 14:49:08 +01:00
|
|
|
required: true
|
|
|
|
schema:
|
2021-11-25 15:44:16 +01:00
|
|
|
type: string
|
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
|
2021-11-30 15:02:52 +01:00
|
|
|
/pdb/v2/productionOrder/{productionOrderNumber}:
|
|
|
|
get:
|
|
|
|
tags: [ "Regular" ]
|
|
|
|
operationId: Regular.productionOrder
|
|
|
|
summary: Returns productionOrder entries
|
|
|
|
description:
|
|
|
|
STATEMENTBEGIN
|
|
|
|
SELECT produktionsauftrag AS productionOrderNumber,
|
|
|
|
C_Nummer AS cNumber,
|
|
|
|
artikelcode AS articleCode,
|
|
|
|
stueckzahl AS numOfParts,
|
|
|
|
IX AS ix,
|
|
|
|
referenz_dokument AS referenceDocument
|
2021-11-30 18:15:09 +01:00
|
|
|
FROM auftraege
|
2021-11-30 15:02:52 +01:00
|
|
|
WHERE produktionsauftrag = @productionOrderNumber
|
|
|
|
STATEMENTEND
|
|
|
|
parameters:
|
|
|
|
- name: productionOrderNumber
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
2021-11-30 19:09:22 +01:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Here are your productionOrder items
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: "#/components/schemas/productionOrder"
|
|
|
|
404:
|
|
|
|
description: No such productionOrder entries available
|
|
|
|
/pdb/v2/baseData/{articleNumber}:
|
|
|
|
get:
|
|
|
|
tags: [ "Regular" ]
|
|
|
|
operationId: Regular.baseData
|
|
|
|
summary: Returns baseData entries
|
|
|
|
description:
|
|
|
|
STATEMENTBEGIN
|
|
|
|
SELECT Artikelcode,
|
|
|
|
Art,
|
|
|
|
bezeichnung
|
|
|
|
FROM stammdaten
|
|
|
|
WHERE Artikelcode = @articleNumber
|
|
|
|
STATEMENTEND
|
|
|
|
parameters:
|
|
|
|
- name: articleNumber
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
2021-11-30 15:02:52 +01:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Here are your productionOrder items
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: "#/components/schemas/productionOrder"
|
|
|
|
404:
|
|
|
|
description: No such productionOrder entries available
|
2021-11-18 19:27:39 +01:00
|
|
|
|
|
|
|
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
|
2021-11-25 15:44:16 +01:00
|
|
|
nr:
|
|
|
|
type: integer
|
2021-11-30 15:02:52 +01:00
|
|
|
productionOrder:
|
|
|
|
description: Selecting columns of the auftraege table from pdb_el
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
productionOrderNumber:
|
|
|
|
type: string
|
|
|
|
cNumber:
|
|
|
|
type: string
|
2021-11-30 18:20:53 +01:00
|
|
|
nullable: true
|
2021-11-30 15:02:52 +01:00
|
|
|
articleCode:
|
|
|
|
type: string
|
|
|
|
numOfParts:
|
|
|
|
type: integer
|
|
|
|
ix:
|
|
|
|
type: string
|
|
|
|
referenceDocument:
|
|
|
|
type: string
|