diff --git a/docs/resourcen.md b/docs/resourcen.md index fb2237a9a1f79ad08bdd4bf34b36b239261f29bf..33167fc55ff8e4a514a3cd4d1151e3d664cbbbe8 100644 --- a/docs/resourcen.md +++ b/docs/resourcen.md @@ -56,20 +56,6 @@ Der Status beschreibt den Fortschritt der Übertragung. Hierzu sind folgende Wer > **Hinweis:** Bei diesem Status handelt es sich um den Übermittlungsstatus vom Sender an den Subscriber. Die Statusmeldungen der Zuständigen Stelle an den Antragsteller sind davon unabhängig. ## Modelle - -<!-- theme: warning --> -> ### Hinweis! -> -> Die Modelle werden derzeit überarbeitet. - -### Addresse -#### [AddressNational](../models/xfall/address-national.json) - -#### [AddressInternational](../models/xfall/address-international.json) - -#### [Address](../models/xfall/address.json) -Die Klasse "Address" ist eine Choice (oneOf) zwischen nationaler und internationaler Adresse. - ### [Error](../models/error.json) Die Klasse "Error" dient der Rückmeldung zu einer nicht erfolgreichen Operation. Sie enthält drei Propertys: @@ -88,13 +74,4 @@ Beispiel für Stammdatenschema "S99000001V1.0": - Regex für "version": `^\d+\.\d+$` ### [Identifier](../models/common/identifier.json) - -### Person -- [AbstractPerson](../models/xfall/abstract-person.json) -- [Individual](../models/xfall/individual.json) -- [Organization](../models/xfall/organization.json) -- [PublicOrganization](../models/xfall/public-organization.json) - -### Public Service Type -- [PublicServiceType](../models/application/public-service-type.json) - +Der Identifier ist nach dem "IdentifierType" aus der "Universal Business Language" der OASIS nachempfunden. Die eigentliche ID ist im Unterelement "id" enthalten. Die weiteren Elemente dienen der Definition des Namensraums, aus dem die ID kommt. Hier ind vor allem die `schemeID` und `schemeVersionID` interessant. diff --git a/docs/sender.md b/docs/sender.md index 33b198630931734f76614a88fbb6fdc5c84705de..85cedf0199aef981dd2c08d601bf19ecdf8c6fc9 100644 --- a/docs/sender.md +++ b/docs/sender.md @@ -75,21 +75,27 @@ Fügt dem Antrag strukturierte Daten hinzu. Beendet die Übertragung des Antrags und löst seinen Versand aus. #### Request -- Body: +- Body: (leer) #### Response -- Body: +- Body: [Status](../models/status.json) -#### Falls -- HTTP +#### Falls die Übertragung unvollständig ist +- HTTP 400 Bad Request - Body: [Error](../models/error.json) +#### Falls die Application-ID ungültig ist +- HTTP 410 Gone +- Body: [Error](../models/error.json) +#### Falls die Gesamtübertragung zu groß ist +- HTTP 413 Request Entity Too Large +- Body: [Error](../models/error.json) -### [Get Application Metadata](../reference/sender.json/paths/~1{source-id}~1{destination-id}~1{application-id}/get) -FIXME ### [Get Application Upload Status](../reference/sender.json/paths/~1{source-id}~1{destination-id}~1{application-id}~1upload-status/get) - -FIXME +Ruft den Status der Uploads der Teile der Übertragung ab. Für die Fachdaten und Dokumente wird jeweils der Status und die auf dem Server vorliegende Länge in Bytes zurückgegegben. Der Status kann folgende Werte haben: +- `missing`: Es wurden noch keine Daten hochgeladen (`length` = 0). +- `partial`: Es wurden bereits Daten hochgeladen, jedoch weniger als in den Metadaten angegeben (0 < `length` < `size` aus Metadaten). +- `complete`: Die Übertragung ist vollständig (`length` = `size` aus Metadaten). diff --git a/models/application/applicant-organization.json b/models/application/applicant-organization.json index 1c3a3636735aab350c28b1320bf15c63af8e0fcd..b649eafe7cfe334d8a844a12a450a59174bf3c50 100644 --- a/models/application/applicant-organization.json +++ b/models/application/applicant-organization.json @@ -3,9 +3,6 @@ "type": "object", "description": "Antragsteller in Form von einer Organisation, z.B. einem Unternehmen", "properties": { - "role": { - "type": "string" - }, "identifier": { "type": "array", "description": "IDs für diese Organisation", @@ -17,17 +14,12 @@ "type": "object", "description": "Informationen, ob diese Organisation vom sendenden System identifiziert wurde", "properties": { - "validated": { - "type": "boolean", - "description": "Wurde die Organisation identifiziert?" - }, "method": { "type": "string", "description": "Identifizierungsmethode" } }, "required": [ - "validated", "method" ] }, @@ -37,7 +29,7 @@ "properties": { "legal-name": { "type": "string", - "description": "Name von rechtswegen, z.B. der Firmenname mit Rechtsform bei Unternehmen" + "description": "Name oder Bezeichnung - Der rechtliche Name einer Organisation. Der Name ist nicht zwingend eindeutig, um die Organisation zu identifizieren." }, "organization-type": { "type": "string", @@ -48,7 +40,8 @@ "description": "Registergericht" }, "registry-type": { - "type": "string" + "type": "string", + "description": "Registerart - Die Registerart macht die Registernummer zur Identifizierung der Organisation innerhalb des Registergerichts eindeutig (z. B. HRA und HRB als Registerarten für das Handelsregister)." }, "registry-number": { "type": "string", @@ -67,8 +60,9 @@ }, "legal-representatives": { "type": "array", + "description": "Namen der Mitglieder des Vertretungsorgans oder der gesetzlichen Vertreter", "items": { - "type": "object" + "$ref": "../person/individual.json" } } } diff --git a/models/application/applicant-person.json b/models/application/applicant-person.json index e4fe81e2a7f4877e23921d46730dc84577ff36b9..5c196924fb954d54f350e7973447592d3a08c741 100644 --- a/models/application/applicant-person.json +++ b/models/application/applicant-person.json @@ -3,9 +3,6 @@ "type": "object", "description": "Antragstellerdaten für eine natürliche Person", "properties": { - "role": { - "type": "string" - }, "identifier": { "type": "array", "description": "IDs der natürlichen Person", diff --git a/models/application/metadata-no-id.json b/models/application/metadata-no-id.json index 83358308bef5afcd0dea828612878613c96d3d11..654a641499574fdb5d1c05beda23f64b06e25cb4 100644 --- a/models/application/metadata-no-id.json +++ b/models/application/metadata-no-id.json @@ -2,70 +2,6 @@ "title": "Application Metadata without ID", "type": "object", "description": "Metadaten eines Antrags noch ohne ID, zum Anlegen eines neuen Antrags. Nach dem Zuweisen der `application-id` wird das Modell [Application Metadata](metadata.json) verwendet.", - "properties": { - "additional-reference-info": { - "type": "object", - "properties": { - "subject": { - "type": "string" - }, - "case-id": { - "type": "string" - } - } - }, - "content-structure": { - "type": "object", - "required": [ - "data", - "docs" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "schema-id" - ], - "properties": { - "schema-id": { - "type": "string", - "pattern": { - "$ref": "../common/id-string.json#/pattern" - } - }, - "mime-type": { - "type": "string", - "enum": [ - "json", - "xml" - ] - } - } - }, - "docs": { - "type": "array", - "items": { - "$ref": "./document.json" - } - } - } - }, - "public-service-type": { - "$ref": "./public-service-type.json" - }, - "applicants": { - "type": "array", - "items": { - "$ref": "./applicant.json" - } - }, - "payment-info": { - "$ref": "./payment-info.json" - } - }, - "required": [ - "content-structure" - ], "x-examples": { "example-1": { "additional-reference-info": { @@ -161,5 +97,70 @@ "transaction": "1f77c5f9b759db9cdce59988b24974d465c7be5e462a6185485559ff6e2dea82" } } - } + }, + "properties": { + "additional-reference-info": { + "type": "object", + "properties": { + "subject": { + "type": "string" + }, + "case-id": { + "type": "string" + } + } + }, + "content-structure": { + "type": "object", + "required": [ + "data", + "docs" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "schema-id", + "mime-type" + ], + "properties": { + "schema-id": { + "type": "string", + "pattern": { + "$ref": "../common/id-string.json#/pattern" + } + }, + "mime-type": { + "type": "string", + "enum": [ + "json", + "xml" + ] + } + } + }, + "docs": { + "type": "array", + "items": { + "$ref": "./document.json" + } + } + } + }, + "public-service-type": { + "$ref": "./public-service-type.json" + }, + "applicants": { + "type": "array", + "items": { + "$ref": "./applicant.json" + } + }, + "payment-info": { + "$ref": "./payment-info.json" + } + }, + "required": [ + "content-structure" + ] } \ No newline at end of file diff --git a/models/common/base64.json b/models/common/base64.json new file mode 100644 index 0000000000000000000000000000000000000000..4492b15f3542eb957a3d786447bd1224ac38ba2f --- /dev/null +++ b/models/common/base64.json @@ -0,0 +1,6 @@ +{ + "type": "string", + "title": "base64", + "pattern": "^[a-zA-Z0-9+/=]+$", + "description": "Base 64 Encoding (RFC 4648 section 4)" +} \ No newline at end of file diff --git a/models/common/jwe.json b/models/common/jwe.json new file mode 100644 index 0000000000000000000000000000000000000000..5b1b02ab6efea5b59ecd0d1a1d90aa84a0234e86 --- /dev/null +++ b/models/common/jwe.json @@ -0,0 +1,116 @@ +{ + "title": "JSON Web Encryption (JWE)", + "type": "object", + "description": "JSON Web Encryption - JSON Serialization - RFC 7516", + "properties": { + "protected": { + "$ref": "./base64url.json" + }, + "unprotected": { + "type": "object", + "properties": { + "alg": { + "type": "string", + "description": "Algorithm", + "enum": [ + "A256GCMKW", + "RS256", + "PS256", + "RSA-OAEP-256" + ] + }, + "enc": { + "type": "string", + "description": "Encryption Algorithm", + "enum": [ + "A256GCM" + ] + }, + "zip": { + "type": "string", + "description": "Compression Algorithm", + "enum": [ + "DEF" + ] + }, + "jku": { + "type": "string", + "description": "JWK Set URL" + }, + "jwk": { + "$ref": "./jwk.json" + }, + "kid": { + "description": "Key ID" + }, + "x5u": { + "type": "string", + "description": "X.509 URL", + "format": "uri" + }, + "x5c": { + "type": "array", + "description": "X.509 Certificate Chain", + "items": { + "$ref": "./base64.json" + } + }, + "x5t": { + "$ref": "./base64url.json" + }, + "x5t#S256": { + "$ref": "./base64url.json" + }, + "typ": { + "type": "string", + "description": "Type" + }, + "cty": { + "type": "string", + "description": "Content Type" + }, + "crit": { + "description": "Critical", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "recipients": { + "type": "array", + "items": { + "type": "object", + "properties": { + "header": { + "$ref": "#/properties/unprotected" + }, + "encrypted_key": { + "$ref": "./base64url.json" + } + } + } + }, + "encrypted_key": { + "type": "object" + }, + "iv": { + "$ref": "./base64url.json" + }, + "aad": { + "$ref": "./base64url.json" + }, + "ciphertext": { + "$ref": "./base64url.json" + }, + "tag": { + "$ref": "./base64url.json" + } + }, + "required": [ + "protected", + "recipients", + "ciphertext" + ] +} \ No newline at end of file diff --git a/models/common/jwk.json b/models/common/jwk.json new file mode 100644 index 0000000000000000000000000000000000000000..18427f3aa4e4778e4dcdee331677a062541af8ae --- /dev/null +++ b/models/common/jwk.json @@ -0,0 +1,70 @@ +{ + "title": "JSON Web Key (JWK)", + "type": "object", + "properties": { + "kty": { + "type": "string", + "description": "Key Type", + "enum": [ + "EC", + "RSA", + "oct", + "OKP" + ] + }, + "use": { + "type": "string", + "description": "Public Key Use", + "enum": [ + "sig", + "enc" + ] + }, + "key_ops": { + "type": "array", + "enum": [ + "sign", + "verify", + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "deriveKey", + "deriveBits" + ], + "description": "Key Operations", + "items": { + "type": "string" + } + }, + "alg": { + "type": "string", + "description": "Algorithm" + }, + "kid": { + "description": "Key ID" + }, + "x5u": { + "type": "string", + "description": "X.509 URL", + "format": "uri" + }, + "x5c": { + "description": "X.509 Certificate Chain", + "type": "array", + "items": { + "$ref": "./base64.json" + } + }, + "x5t": { + "$ref": "./base64url.json" + }, + "x5t#S256": { + "$ref": "./base64url.json" + } + }, + "required": [ + "kty" + ], + "description": "JSON Web Key - RFC 7517" +} \ No newline at end of file diff --git a/models/common/phone.json b/models/common/phone.json index d3969595d6e66c2010c64b09c229f4039784a95a..d5e3e68a5c692a221f39abe481ed6cb5a716435a 100644 --- a/models/common/phone.json +++ b/models/common/phone.json @@ -1,5 +1,5 @@ { - "title": "phone", + "title": "Phone", "type": "object", "description": "Telefonnumer mit Zusatzinformationen", "properties": { @@ -23,5 +23,9 @@ ], "description": "Art der Telefonnummer: work=dienstlich, home=privat oder other=sonstige" } - } + }, + "required": [ + "number", + "type" + ] } \ No newline at end of file diff --git a/models/person/abstract-person.json b/models/person/abstract-person.json index 8b631c5d0ce41eb4fd52b4cc14cef2687c19172c..9afd4b0ac7329f140ffc2dcacd605f44e3dc78d4 100644 --- a/models/person/abstract-person.json +++ b/models/person/abstract-person.json @@ -29,30 +29,7 @@ "type": "array", "description": "Liste der Telefonnummern, außer Fax", "items": { - "type": "object", - "description": "Telefonnumer mit Zusatzinformationen", - "properties": { - "number": { - "$ref": "../common/phonenr.json" - }, - "mobile": { - "type": "boolean", - "description": "Zeigt an, ob es sich um eine Mobilfunknummer handelt." - }, - "type": { - "type": "string", - "enum": [ - "work", - "home", - "other" - ], - "description": "Art der Telefonnummer: work=dienstlich, home=privat oder other=sonstige" - } - }, - "required": [ - "number", - "type" - ] + "$ref": "../common/phone.json" } }, "email": { @@ -66,7 +43,7 @@ "description": "Webadresse" }, "telefax": { - "$ref": "../common/phonenr.json" + "$ref": "../common/phone.json#/properties/number" } } } diff --git a/reference/sender.json b/reference/sender.json index a55ccbcc5675692833326d6c2c349b3b9a259053..7476433bd5065a0e80471bf330f5db8bbd7a9182 100644 --- a/reference/sender.json +++ b/reference/sender.json @@ -401,6 +401,13 @@ "items": { "type": "object", "properties": { + "doc-id": { + "type": "string", + "pattern": { + "$ref": "../models/common/id-string.json#/pattern" + }, + "description": "ID des Dokuments. Diese muss nur innerhalb des Antrags (Application) eindeutig sein. Es wird daher empfohlen, die IDs fortlaufend (1, 2 etc.) zu vergeben." + }, "status": { "type": "string", "enum": [ @@ -415,6 +422,7 @@ } }, "required": [ + "doc-id", "status", "length" ] @@ -460,7 +468,7 @@ } ], "post": { - "summary": "Create Application", + "summary": "Create Transfer", "operationId": "create-transfer", "responses": { "201": { @@ -573,7 +581,7 @@ } ], "post": { - "summary": "Commit Application", + "summary": "Commit Transfer", "operationId": "commit-transfer", "responses": { "200": {