client-lib, client-app und server-app aus den jeweiligen projekten importiert. api-definition begonnen zu implementieren
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package com.kapdion.pisano;
|
||||
|
||||
public class ApiConstants {
|
||||
public static final String VOCAB_PATH = "vocab.jsonld";
|
||||
public static final String CONTEXT_PATH = "context.jsonld";
|
||||
public static final String JSON_LD_MIME = "application/ld+json";
|
||||
|
||||
public static final String VOCAB_URL = "https://bureau.kapdion.com/produktwissen-app/produktApi/vocab";
|
||||
}
|
||||
30
api-definition/src/main/resources/context.jsonld
Normal file
30
api-definition/src/main/resources/context.jsonld
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"@context": {
|
||||
"api": "https://bureau.kapdion.com/produktwissen-app/produktApi/vocab#",
|
||||
"vvo": "http://vvo.pisanoapi.at/",
|
||||
"hydra": "http://www.w3.org/ns/hydra/core#",
|
||||
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
||||
|
||||
"ProductsRequest": "api:ProductsRequest",
|
||||
"ProductsResponse": "api:ProductsResponse",
|
||||
"CalculateRequest": "api:CalculateRequest",
|
||||
"CalculateResponse": "api:CalculateResponse",
|
||||
"ProdElement": "vvo:ProdElement",
|
||||
"Meldung": "vvo:Meldung",
|
||||
|
||||
"stichtag": {
|
||||
"@id": "api:stichtag",
|
||||
"@type": "xsd:date"
|
||||
},
|
||||
|
||||
"bez": "vvo:bez",
|
||||
"value": "vvo:value",
|
||||
"required": { "@id": "vvo:required", "@type": "xsd:boolean" },
|
||||
"minOccurrence": { "@id": "vvo:minOccurrence", "@type": "xsd:int" },
|
||||
"maxOccurrence": { "@id": "vvo:maxOccurrence", "@type": "xsd:int" },
|
||||
"errorMsg": "vvo:errorMsg",
|
||||
"errorType": "vvo:errorType",
|
||||
"Baustein": { "@id": "vvo:Baustein", "@type": "@id" },
|
||||
"Parent": { "@id": "vvo:Parent", "@type": "@id" }
|
||||
}
|
||||
}
|
||||
114
api-definition/src/main/resources/vocab.jsonld
Normal file
114
api-definition/src/main/resources/vocab.jsonld
Normal file
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"@context": {
|
||||
"hydra": "http://www.w3.org/ns/hydra/core#",
|
||||
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
||||
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
|
||||
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
||||
"schema": "http://schema.org/",
|
||||
"api": "https://bureau.kapdion.com/produktwissen-app/produktApi/vocab#",
|
||||
"vvo": "http://vvo.pisanoapi.at/"
|
||||
},
|
||||
"@id": "api:ApiDocumentation",
|
||||
"@type": "hydra:ApiDocumentation",
|
||||
"hydra:title": "Produkt API",
|
||||
"hydra:entrypoint": "https://bureau.kapdion.com/produktwissen-app/produktApi",
|
||||
"hydra:supportedClass": [
|
||||
{
|
||||
"@id": "api:EntryPoint",
|
||||
"@type": "hydra:Class",
|
||||
"hydra:title": "API Einstiegspunkt",
|
||||
"hydra:supportedOperation": [
|
||||
{
|
||||
"@id": "api:Produktwissen",
|
||||
"@type": "hydra:Operation",
|
||||
"hydra:method": "POST",
|
||||
"hydra:title": "Produktwissen abfragen",
|
||||
"hydra:expects": "api:ProductsRequest",
|
||||
"hydra:returns": "api:ProductsResponse",
|
||||
"hydra:possibleStatus": [
|
||||
{ "hydra:statusCode": 200, "description": "Produktwissen erfolgreich abgefragt" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"@id": "api:Calculate",
|
||||
"@type": "hydra:Operation",
|
||||
"hydra:method": "POST",
|
||||
"hydra:title": "Berechnung ausführen",
|
||||
"hydra:expects": "api:CalculateRequest",
|
||||
"hydra:returns": "api:CalculateResponse",
|
||||
"hydra:possibleStatus": [
|
||||
{ "hydra:statusCode": 200, "description": "Berechnung durchgeführt" }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"@id": "api:ProductsRequest",
|
||||
"@type": "hydra:Class",
|
||||
"hydra:title": "Produktanfrage",
|
||||
"hydra:supportedProperty": [
|
||||
{
|
||||
"hydra:property": "api:stichtag",
|
||||
"hydra:title": "Stichtag für die Abfrage",
|
||||
"hydra:required": true,
|
||||
"range": "xsd:date"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"@id": "api:CalculateRequest",
|
||||
"@type": "hydra:Class",
|
||||
"hydra:title": "Berechnungsanfrage",
|
||||
"hydra:supportedProperty": [
|
||||
{ "hydra:property": "vvo:ProdElement" },
|
||||
{ "hydra:property": "vvo:Meldung" },
|
||||
{ "hydra:property": "vvo:FahrzeugType" }
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"@id": "api:ProductsResponse",
|
||||
"@type": "hydra:Class",
|
||||
"hydra:title": "Antwort der Produktwissen-Abfrage",
|
||||
"hydra:supportedProperty": [
|
||||
{ "hydra:property": "vvo:ProdElement" },
|
||||
{ "hydra:property": "vvo:Meldung" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"@id": "api:CalculateResponse",
|
||||
"@type": "hydra:Class",
|
||||
"hydra:title": "Antwort der Berechnung",
|
||||
"hydra:supportedProperty": [
|
||||
{ "hydra:property": "vvo:ProdElement" },
|
||||
{ "hydra:property": "vvo:Meldung" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"@id": "vvo:ProdElement",
|
||||
"@type": "hydra:Class",
|
||||
"hydra:title": "VVO Produkt-Element",
|
||||
"hydra:description": "Ein Element innerhalb der Versicherungsstruktur (Baustein, Elementarprodukt etc.)",
|
||||
"hydra:supportedProperty": [
|
||||
{ "hydra:property": "vvo:bez", "hydra:title": "Bezeichnung" },
|
||||
{ "hydra:property": "vvo:value", "hydra:title": "Wert" },
|
||||
{ "hydra:property": "vvo:minOccurrence", "hydra:title": "Minimale Häufigkeit" },
|
||||
{ "hydra:property": "vvo:maxOccurrence", "hydra:title": "Maximale Häufigkeit" },
|
||||
{ "hydra:property": "vvo:Baustein", "hydra:title": "Referenz auf Unterbausteine" },
|
||||
{ "hydra:property": "vvo:Parent", "hydra:title": "Referenz auf Elternelement" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"@id": "vvo:Meldung",
|
||||
"@type": "hydra:Class",
|
||||
"hydra:title": "System-Meldung",
|
||||
"hydra:supportedProperty": [
|
||||
{ "hydra:property": "vvo:errorMsg", "hydra:title": "Fehlermeldung Text" },
|
||||
{ "hydra:property": "vvo:errorType", "hydra:title": "Fehlertyp Code" }
|
||||
]
|
||||
}
|
||||
|
||||
//To-Do: Genauer ausformulieren
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user