diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/api/MdEinreichenProviderApi.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/api/MdEinreichenProviderApi.java deleted file mode 100644 index edc27024..00000000 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/api/MdEinreichenProviderApi.java +++ /dev/null @@ -1,700 +0,0 @@ -/* - * dip-mds - * DIP-Massendatenschnittstelle - * - * The version of the OpenAPI document: DIP-MDS 1.3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package software.xdev.bzst.dip.client.generated.api; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.StringJoiner; - -import com.fasterxml.jackson.core.type.TypeReference; - -import software.xdev.bzst.dip.client.generated.client.ApiClient; -import software.xdev.bzst.dip.client.generated.client.ApiException; -import software.xdev.bzst.dip.client.generated.client.BaseApi; -import software.xdev.bzst.dip.client.generated.client.Configuration; -import software.xdev.bzst.dip.client.generated.client.Pair; - -public class MdEinreichenProviderApi extends BaseApi { - - public MdEinreichenProviderApi() { - super(Configuration.getDefaultApiClient()); - } - - public MdEinreichenProviderApi(final ApiClient apiClient) { - super(apiClient); - } - - /** - * Abruf einer Liste aller Datentransfernummern mit verfügbarem Protokoll - * Abruf einer Liste aller Datentransfernummern mit verfügbarem Protokoll - * @param authorization (optional) - * @return InputStream - * @throws ApiException if fails to make API call - */ - public InputStream alleProtokollnummern(final String authorization) throws ApiException { - return this.alleProtokollnummern(authorization, Collections.emptyMap()); - } - - - /** - * Abruf einer Liste aller Datentransfernummern mit verfügbarem Protokoll - * Abruf einer Liste aller Datentransfernummern mit verfügbarem Protokoll - * @param authorization (optional) - * @param additionalHeaders additionalHeaders for this call - * @return InputStream - * @throws ApiException if fails to make API call - */ - public InputStream alleProtokollnummern(final String authorization, final Map additionalHeaders) throws ApiException { - final Object localVarPostBody = null; - - // create path and map variables - final String localVarPath = "/dip/md/protocolnumbers"; - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - final List localVarQueryParams = new ArrayList<>(); - final List localVarCollectionQueryParams = new ArrayList<>(); - final Map localVarHeaderParams = new HashMap<>(); - final Map localVarCookieParams = new HashMap<>(); - final Map localVarFormParams = new HashMap<>(); - - if (authorization != null) - localVarHeaderParams.put("Authorization", this.apiClient.parameterToString(authorization)); - - localVarHeaderParams.putAll(additionalHeaders); - - - - final String[] localVarAccepts = { - "application/octet-stream" - }; - final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); - - final String[] localVarAuthNames = new String[] { }; - - final TypeReference localVarReturnType = new TypeReference<>() - { - }; - return this.apiClient.invokeAPI( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType - ); - } - - /** - * Einreichung zusätzlicher Anhänge - * Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @param body Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer (optional) - * @throws ApiException if fails to make API call - */ - public void anhangEinreichen(final String datentransfernummer, final String authorization, final InputStream body) throws ApiException { - this.anhangEinreichen(datentransfernummer, authorization, body, Collections.emptyMap()); - } - - - /** - * Einreichung zusätzlicher Anhänge - * Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @param body Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer (optional) - * @param additionalHeaders additionalHeaders for this call - * @throws ApiException if fails to make API call - */ - public void anhangEinreichen(final String datentransfernummer, final String authorization, final InputStream body, final Map additionalHeaders) throws ApiException { - final Object localVarPostBody = body; - - // verify the required parameter 'datentransfernummer' is set - if (datentransfernummer == null) { - throw new ApiException(400, "Missing the required parameter 'datentransfernummer' when calling anhangEinreichen"); - } - - // create path and map variables - final String localVarPath = "/dip/md/{datentransfernummer}/attachment" - .replaceAll("\\{" + "datentransfernummer" + "\\}", this.apiClient.escapeString(datentransfernummer.toString())); - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - final List localVarQueryParams = new ArrayList<>(); - final List localVarCollectionQueryParams = new ArrayList<>(); - final Map localVarHeaderParams = new HashMap<>(); - final Map localVarCookieParams = new HashMap<>(); - final Map localVarFormParams = new HashMap<>(); - - if (authorization != null) - localVarHeaderParams.put("Authorization", this.apiClient.parameterToString(authorization)); - - localVarHeaderParams.putAll(additionalHeaders); - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/octet-stream" - }; - final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); - - final String[] localVarAuthNames = new String[] { }; - - this.apiClient.invokeAPI( - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null - ); - } - - /** - * Abbruch der laufenden Übertragung und Verwerfen der bisher übertragenen Dateien - * Verkünden der Absicht, die laufende Massendatenlieferung abzubrechen und die übertragenen Dateien zu verwerfen - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @throws ApiException if fails to make API call - */ - public void einreichungAbbrechen(final String datentransfernummer, final String authorization) throws ApiException { - this.einreichungAbbrechen(datentransfernummer, authorization, Collections.emptyMap()); - } - - - /** - * Abbruch der laufenden Übertragung und Verwerfen der bisher übertragenen Dateien - * Verkünden der Absicht, die laufende Massendatenlieferung abzubrechen und die übertragenen Dateien zu verwerfen - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @param additionalHeaders additionalHeaders for this call - * @throws ApiException if fails to make API call - */ - public void einreichungAbbrechen(final String datentransfernummer, final String authorization, final Map additionalHeaders) throws ApiException { - final Object localVarPostBody = null; - - // verify the required parameter 'datentransfernummer' is set - if (datentransfernummer == null) { - throw new ApiException(400, "Missing the required parameter 'datentransfernummer' when calling einreichungAbbrechen"); - } - - // create path and map variables - final String localVarPath = "/dip/md/{datentransfernummer}/abort" - .replaceAll("\\{" + "datentransfernummer" + "\\}", this.apiClient.escapeString(datentransfernummer.toString())); - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - final List localVarQueryParams = new ArrayList<>(); - final List localVarCollectionQueryParams = new ArrayList<>(); - final Map localVarHeaderParams = new HashMap<>(); - final Map localVarCookieParams = new HashMap<>(); - final Map localVarFormParams = new HashMap<>(); - - if (authorization != null) - localVarHeaderParams.put("Authorization", this.apiClient.parameterToString(authorization)); - - localVarHeaderParams.putAll(additionalHeaders); - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); - - final String[] localVarAuthNames = new String[] { }; - - this.apiClient.invokeAPI( - localVarPath, - "PATCH", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null - ); - } - - /** - * Anfordern einer Datentransfernummer und Einleiten einer Massendatenlieferung - * Anfordern einer Datentransfernummer zur Identifikation der Lieferung und Einleiten einer Massendatenlieferung - * @param fachverfahren Das Ziel-Fachverfahren (required) - * @param authorization (optional) - * @return String - * @throws ApiException if fails to make API call - */ - public String einreichungAnmelden(final String fachverfahren, final String authorization) throws ApiException { - return this.einreichungAnmelden(fachverfahren, authorization, Collections.emptyMap()); - } - - - /** - * Anfordern einer Datentransfernummer und Einleiten einer Massendatenlieferung - * Anfordern einer Datentransfernummer zur Identifikation der Lieferung und Einleiten einer Massendatenlieferung - * @param fachverfahren Das Ziel-Fachverfahren (required) - * @param authorization (optional) - * @param additionalHeaders additionalHeaders for this call - * @return String - * @throws ApiException if fails to make API call - */ - public String einreichungAnmelden(final String fachverfahren, final String authorization, final Map additionalHeaders) throws ApiException { - final Object localVarPostBody = null; - - // verify the required parameter 'fachverfahren' is set - if (fachverfahren == null) { - throw new ApiException(400, "Missing the required parameter 'fachverfahren' when calling einreichungAnmelden"); - } - - // create path and map variables - final String localVarPath = "/dip/start/{fachverfahren}" - .replaceAll("\\{" + "fachverfahren" + "\\}", this.apiClient.escapeString(fachverfahren.toString())); - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - final List localVarQueryParams = new ArrayList<>(); - final List localVarCollectionQueryParams = new ArrayList<>(); - final Map localVarHeaderParams = new HashMap<>(); - final Map localVarCookieParams = new HashMap<>(); - final Map localVarFormParams = new HashMap<>(); - - if (authorization != null) - localVarHeaderParams.put("Authorization", this.apiClient.parameterToString(authorization)); - - localVarHeaderParams.putAll(additionalHeaders); - - - - final String[] localVarAccepts = { - "text/plain" - }; - final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); - - final String[] localVarAuthNames = new String[] { }; - - final TypeReference localVarReturnType = new TypeReference<>() - { - }; - return this.apiClient.invokeAPI( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType - ); - } - - /** - * Erklärung, dass die Massendatenlieferung abgeschlossen ist - * Erklärung der Fertigstellung der Massendatenlieferung - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @throws ApiException if fails to make API call - */ - public void einreichungBeenden(final String datentransfernummer, final String authorization) throws ApiException { - this.einreichungBeenden(datentransfernummer, authorization, Collections.emptyMap()); - } - - - /** - * Erklärung, dass die Massendatenlieferung abgeschlossen ist - * Erklärung der Fertigstellung der Massendatenlieferung - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @param additionalHeaders additionalHeaders for this call - * @throws ApiException if fails to make API call - */ - public void einreichungBeenden(final String datentransfernummer, final String authorization, final Map additionalHeaders) throws ApiException { - final Object localVarPostBody = null; - - // verify the required parameter 'datentransfernummer' is set - if (datentransfernummer == null) { - throw new ApiException(400, "Missing the required parameter 'datentransfernummer' when calling einreichungBeenden"); - } - - // create path and map variables - final String localVarPath = "/dip/md/{datentransfernummer}/finish" - .replaceAll("\\{" + "datentransfernummer" + "\\}", this.apiClient.escapeString(datentransfernummer.toString())); - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - final List localVarQueryParams = new ArrayList<>(); - final List localVarCollectionQueryParams = new ArrayList<>(); - final Map localVarHeaderParams = new HashMap<>(); - final Map localVarCookieParams = new HashMap<>(); - final Map localVarFormParams = new HashMap<>(); - - if (authorization != null) - localVarHeaderParams.put("Authorization", this.apiClient.parameterToString(authorization)); - - localVarHeaderParams.putAll(additionalHeaders); - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); - - final String[] localVarAuthNames = new String[] { }; - - this.apiClient.invokeAPI( - localVarPath, - "PATCH", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null - ); - } - - /** - * Einreichung des XML - * Einreichung der Daten-XML unter Angabe einer Datentransfernummer - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @param body Einreichung der Daten-XML unter Angabe einer Datentransfernummer (optional) - * @throws ApiException if fails to make API call - */ - public void massendatenEinreichen(final String datentransfernummer, final String authorization, final InputStream body) throws ApiException { - this.massendatenEinreichen(datentransfernummer, authorization, body, Collections.emptyMap()); - } - - - /** - * Einreichung des XML - * Einreichung der Daten-XML unter Angabe einer Datentransfernummer - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @param body Einreichung der Daten-XML unter Angabe einer Datentransfernummer (optional) - * @param additionalHeaders additionalHeaders for this call - * @throws ApiException if fails to make API call - */ - public void massendatenEinreichen(final String datentransfernummer, final String authorization, final InputStream body, final Map additionalHeaders) throws ApiException { - final Object localVarPostBody = body; - - // verify the required parameter 'datentransfernummer' is set - if (datentransfernummer == null) { - throw new ApiException(400, "Missing the required parameter 'datentransfernummer' when calling massendatenEinreichen"); - } - - // create path and map variables - final String localVarPath = "/dip/md/{datentransfernummer}/xml" - .replaceAll("\\{" + "datentransfernummer" + "\\}", this.apiClient.escapeString(datentransfernummer.toString())); - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - final List localVarQueryParams = new ArrayList<>(); - final List localVarCollectionQueryParams = new ArrayList<>(); - final Map localVarHeaderParams = new HashMap<>(); - final Map localVarCookieParams = new HashMap<>(); - final Map localVarFormParams = new HashMap<>(); - - if (authorization != null) - localVarHeaderParams.put("Authorization", this.apiClient.parameterToString(authorization)); - - localVarHeaderParams.putAll(additionalHeaders); - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/octet-stream" - }; - final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); - - final String[] localVarAuthNames = new String[] { }; - - this.apiClient.invokeAPI( - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null - ); - } - - /** - * Abruf des Ergebnisprotokolls - * Abruf des Ergebnisprotokolls - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @return InputStream - * @throws ApiException if fails to make API call - */ - public InputStream protokollAbrufen(final String datentransfernummer, final String authorization) throws ApiException { - return this.protokollAbrufen(datentransfernummer, authorization, Collections.emptyMap()); - } - - - /** - * Abruf des Ergebnisprotokolls - * Abruf des Ergebnisprotokolls - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @param additionalHeaders additionalHeaders for this call - * @return InputStream - * @throws ApiException if fails to make API call - */ - public InputStream protokollAbrufen(final String datentransfernummer, final String authorization, final Map additionalHeaders) throws ApiException { - final Object localVarPostBody = null; - - // verify the required parameter 'datentransfernummer' is set - if (datentransfernummer == null) { - throw new ApiException(400, "Missing the required parameter 'datentransfernummer' when calling protokollAbrufen"); - } - - // create path and map variables - final String localVarPath = "/dip/md/{datentransfernummer}/protocol" - .replaceAll("\\{" + "datentransfernummer" + "\\}", this.apiClient.escapeString(datentransfernummer.toString())); - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - final List localVarQueryParams = new ArrayList<>(); - final List localVarCollectionQueryParams = new ArrayList<>(); - final Map localVarHeaderParams = new HashMap<>(); - final Map localVarCookieParams = new HashMap<>(); - final Map localVarFormParams = new HashMap<>(); - - if (authorization != null) - localVarHeaderParams.put("Authorization", this.apiClient.parameterToString(authorization)); - - localVarHeaderParams.putAll(additionalHeaders); - - - - final String[] localVarAccepts = { - "application/octet-stream" - }; - final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); - - final String[] localVarAuthNames = new String[] { }; - - final TypeReference localVarReturnType = new TypeReference<>() - { - }; - return this.apiClient.invokeAPI( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType - ); - } - - /** - * Erhalt des Protokolls bestätigen - * Erhalt des Protokolls bestätigen - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @throws ApiException if fails to make API call - */ - public void protokollErhalten(final String datentransfernummer, final String authorization) throws ApiException { - this.protokollErhalten(datentransfernummer, authorization, Collections.emptyMap()); - } - - - /** - * Erhalt des Protokolls bestätigen - * Erhalt des Protokolls bestätigen - * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) - * @param authorization (optional) - * @param additionalHeaders additionalHeaders for this call - * @throws ApiException if fails to make API call - */ - public void protokollErhalten(final String datentransfernummer, final String authorization, final Map additionalHeaders) throws ApiException { - final Object localVarPostBody = null; - - // verify the required parameter 'datentransfernummer' is set - if (datentransfernummer == null) { - throw new ApiException(400, "Missing the required parameter 'datentransfernummer' when calling protokollErhalten"); - } - - // create path and map variables - final String localVarPath = "/dip/md/{datentransfernummer}/protocol" - .replaceAll("\\{" + "datentransfernummer" + "\\}", this.apiClient.escapeString(datentransfernummer.toString())); - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - final List localVarQueryParams = new ArrayList<>(); - final List localVarCollectionQueryParams = new ArrayList<>(); - final Map localVarHeaderParams = new HashMap<>(); - final Map localVarCookieParams = new HashMap<>(); - final Map localVarFormParams = new HashMap<>(); - - if (authorization != null) - localVarHeaderParams.put("Authorization", this.apiClient.parameterToString(authorization)); - - localVarHeaderParams.putAll(additionalHeaders); - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); - - final String[] localVarAuthNames = new String[] { }; - - this.apiClient.invokeAPI( - localVarPath, - "PATCH", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null - ); - } - - @Override - public T invokeAPI(final String url, final String method, final Object request, final TypeReference returnType, final Map additionalHeaders) throws ApiException { - final String localVarPath = url.replace(this.apiClient.getBaseURL(), ""); - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - final List localVarQueryParams = new ArrayList<>(); - final List localVarCollectionQueryParams = new ArrayList<>(); - final Map localVarHeaderParams = new HashMap<>(); - final Map localVarCookieParams = new HashMap<>(); - final Map localVarFormParams = new HashMap<>(); - - localVarHeaderParams.putAll(additionalHeaders); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); - - final String[] localVarAuthNames = new String[] { }; - - return this.apiClient.invokeAPI( - localVarPath, - method, - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - request, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - returnType - ); - } -} diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/api/MdsProviderV21Api.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/api/MdsProviderV21Api.java new file mode 100644 index 00000000..85d0b603 --- /dev/null +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/api/MdsProviderV21Api.java @@ -0,0 +1,793 @@ +/* + * dip-mds + * DIP-Massendatenschnittstelle + * + * The version of the OpenAPI document: DIP-MDS 2.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package software.xdev.bzst.dip.client.generated.api; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.StringJoiner; + +import com.fasterxml.jackson.core.type.TypeReference; + +import software.xdev.bzst.dip.client.generated.client.ApiClient; +import software.xdev.bzst.dip.client.generated.client.ApiException; +import software.xdev.bzst.dip.client.generated.client.BaseApi; +import software.xdev.bzst.dip.client.generated.client.Configuration; +import software.xdev.bzst.dip.client.generated.client.Pair; + + +public class MdsProviderV21Api extends BaseApi +{ + + public MdsProviderV21Api() + { + super(Configuration.getDefaultApiClient()); + } + + public MdsProviderV21Api(final ApiClient apiClient) + { + super(apiClient); + } + + /** + * Abruf einer Liste aller Datentransfernummern, für die das Protokoll noch aussteht Abruf einer Liste aller + * Datentransfernummern, für die das Protokoll noch aussteht + * + * @return InputStream + * @throws ApiException if fails to make API call + */ + public InputStream alleOffenenDatentransfernummern() throws ApiException + { + return this.alleOffenenDatentransfernummern(Collections.emptyMap()); + } + + /** + * Abruf einer Liste aller Datentransfernummern, für die das Protokoll noch aussteht Abruf einer Liste aller + * Datentransfernummern, für die das Protokoll noch aussteht + * + * @param additionalHeaders additionalHeaders for this call + * @return InputStream + * @throws ApiException if fails to make API call + */ + public InputStream alleOffenenDatentransfernummern(final Map additionalHeaders) throws ApiException + { + final Object localVarPostBody = null; + + // create path and map variables + final String localVarPath = "/dip/md/v2_1/opennumbers"; + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + "application/octet-stream" + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + final TypeReference localVarReturnType = new TypeReference<>() + { + }; + return this.apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + + /** + * Abruf einer Liste aller Datentransfernummern mit verfügbarem Protokoll Abruf einer Liste aller + * Datentransfernummern mit verfügbarem Protokoll + * + * @return InputStream + * @throws ApiException if fails to make API call + */ + public InputStream alleProtokollnummern() throws ApiException + { + return this.alleProtokollnummern(Collections.emptyMap()); + } + + /** + * Abruf einer Liste aller Datentransfernummern mit verfügbarem Protokoll Abruf einer Liste aller + * Datentransfernummern mit verfügbarem Protokoll + * + * @param additionalHeaders additionalHeaders for this call + * @return InputStream + * @throws ApiException if fails to make API call + */ + public InputStream alleProtokollnummern(final Map additionalHeaders) throws ApiException + { + final Object localVarPostBody = null; + + // create path and map variables + final String localVarPath = "/dip/md/v2_1/protocolnumbers"; + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + "application/octet-stream" + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + final TypeReference localVarReturnType = new TypeReference<>() + { + }; + return this.apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + + /** + * Einreichung zusätzlicher Anhänge Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @param body Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer (optional) + * @throws ApiException if fails to make API call + */ + public void anhangEinreichen( + @jakarta.annotation.Nonnull final String datentransfernummer, + @jakarta.annotation.Nullable final InputStream body) throws ApiException + { + this.anhangEinreichen(datentransfernummer, body, Collections.emptyMap()); + } + + /** + * Einreichung zusätzlicher Anhänge Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @param body Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer (optional) + * @param additionalHeaders additionalHeaders for this call + * @throws ApiException if fails to make API call + */ + public void anhangEinreichen( + @jakarta.annotation.Nonnull final String datentransfernummer, + @jakarta.annotation.Nullable final InputStream body, + final Map additionalHeaders) throws ApiException + { + final Object localVarPostBody = body; + + // verify the required parameter 'datentransfernummer' is set + if(datentransfernummer == null) + { + throw new ApiException( + 400, + "Missing the required parameter 'datentransfernummer' when calling anhangEinreichen"); + } + + // create path and map variables + final String localVarPath = "/dip/md/v2_1/{datentransfernummer}/attachment" + .replaceAll( + "\\{" + "datentransfernummer" + "\\}", + this.apiClient.escapeString(this.apiClient.parameterToString(datentransfernummer))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/octet-stream" + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + this.apiClient.invokeAPI( + localVarPath, + "PUT", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null + ); + } + + /** + * Abbruch der laufenden Übertragung und Verwerfen der bisher übertragenen Dateien Verkünden der Absicht, die + * laufende Massendatenlieferung abzubrechen und die übertragenen Dateien zu verwerfen + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @throws ApiException if fails to make API call + */ + public void einreichungAbbrechen(@jakarta.annotation.Nonnull final String datentransfernummer) throws ApiException + { + this.einreichungAbbrechen(datentransfernummer, Collections.emptyMap()); + } + + /** + * Abbruch der laufenden Übertragung und Verwerfen der bisher übertragenen Dateien Verkünden der Absicht, die + * laufende Massendatenlieferung abzubrechen und die übertragenen Dateien zu verwerfen + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @param additionalHeaders additionalHeaders for this call + * @throws ApiException if fails to make API call + */ + public void einreichungAbbrechen( + @jakarta.annotation.Nonnull final String datentransfernummer, + final Map additionalHeaders) throws ApiException + { + final Object localVarPostBody = null; + + // verify the required parameter 'datentransfernummer' is set + if(datentransfernummer == null) + { + throw new ApiException( + 400, + "Missing the required parameter 'datentransfernummer' when calling einreichungAbbrechen"); + } + + // create path and map variables + final String localVarPath = "/dip/md/v2_1/{datentransfernummer}/abort" + .replaceAll( + "\\{" + "datentransfernummer" + "\\}", + this.apiClient.escapeString(this.apiClient.parameterToString(datentransfernummer))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + this.apiClient.invokeAPI( + localVarPath, + "PATCH", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null + ); + } + + /** + * Anfordern einer Datentransfernummer und Einleiten einer Massendatenlieferung Anfordern einer Datentransfernummer + * zur Identifikation der Lieferung und Einleiten einer Massendatenlieferung + * + * @param fachverfahren Das Ziel-Fachverfahren (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String einreichungAnmelden(@jakarta.annotation.Nonnull final String fachverfahren) throws ApiException + { + return this.einreichungAnmelden(fachverfahren, Collections.emptyMap()); + } + + /** + * Anfordern einer Datentransfernummer und Einleiten einer Massendatenlieferung Anfordern einer Datentransfernummer + * zur Identifikation der Lieferung und Einleiten einer Massendatenlieferung + * + * @param fachverfahren Das Ziel-Fachverfahren (required) + * @param additionalHeaders additionalHeaders for this call + * @return String + * @throws ApiException if fails to make API call + */ + public String einreichungAnmelden( + @jakarta.annotation.Nonnull final String fachverfahren, + final Map additionalHeaders) throws ApiException + { + final Object localVarPostBody = null; + + // verify the required parameter 'fachverfahren' is set + if(fachverfahren == null) + { + throw new ApiException( + 400, + "Missing the required parameter 'fachverfahren' when calling einreichungAnmelden"); + } + + // create path and map variables + final String localVarPath = "/dip/md/v2_1/start/{fachverfahren}" + .replaceAll( + "\\{" + "fachverfahren" + "\\}", + this.apiClient.escapeString(this.apiClient.parameterToString(fachverfahren))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + final TypeReference localVarReturnType = new TypeReference<>() + { + }; + return this.apiClient.invokeAPI( + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + + /** + * Erklärung, dass die Massendatenlieferung abgeschlossen ist Erklärung der Fertigstellung der Massendatenlieferung + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @throws ApiException if fails to make API call + */ + public void einreichungBeenden(@jakarta.annotation.Nonnull final String datentransfernummer) throws ApiException + { + this.einreichungBeenden(datentransfernummer, Collections.emptyMap()); + } + + /** + * Erklärung, dass die Massendatenlieferung abgeschlossen ist Erklärung der Fertigstellung der Massendatenlieferung + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @param additionalHeaders additionalHeaders for this call + * @throws ApiException if fails to make API call + */ + public void einreichungBeenden( + @jakarta.annotation.Nonnull final String datentransfernummer, + final Map additionalHeaders) throws ApiException + { + final Object localVarPostBody = null; + + // verify the required parameter 'datentransfernummer' is set + if(datentransfernummer == null) + { + throw new ApiException( + 400, + "Missing the required parameter 'datentransfernummer' when calling einreichungBeenden"); + } + + // create path and map variables + final String localVarPath = "/dip/md/v2_1/{datentransfernummer}/finish" + .replaceAll( + "\\{" + "datentransfernummer" + "\\}", + this.apiClient.escapeString(this.apiClient.parameterToString(datentransfernummer))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + this.apiClient.invokeAPI( + localVarPath, + "PATCH", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null + ); + } + + /** + * Einreichung des XML Einreichung der Daten-XML unter Angabe einer Datentransfernummer + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @param body Einreichung der Daten-XML unter Angabe einer Datentransfernummer (optional) + * @throws ApiException if fails to make API call + */ + public void massendatenEinreichen( + @jakarta.annotation.Nonnull final String datentransfernummer, + @jakarta.annotation.Nullable final InputStream body) throws ApiException + { + this.massendatenEinreichen(datentransfernummer, body, Collections.emptyMap()); + } + + /** + * Einreichung des XML Einreichung der Daten-XML unter Angabe einer Datentransfernummer + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @param body Einreichung der Daten-XML unter Angabe einer Datentransfernummer (optional) + * @param additionalHeaders additionalHeaders for this call + * @throws ApiException if fails to make API call + */ + public void massendatenEinreichen( + @jakarta.annotation.Nonnull final String datentransfernummer, + @jakarta.annotation.Nullable final InputStream body, + final Map additionalHeaders) throws ApiException + { + final Object localVarPostBody = body; + + // verify the required parameter 'datentransfernummer' is set + if(datentransfernummer == null) + { + throw new ApiException( + 400, + "Missing the required parameter 'datentransfernummer' when calling massendatenEinreichen"); + } + + // create path and map variables + final String localVarPath = "/dip/md/v2_1/{datentransfernummer}/xml" + .replaceAll( + "\\{" + "datentransfernummer" + "\\}", + this.apiClient.escapeString(this.apiClient.parameterToString(datentransfernummer))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/octet-stream" + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + this.apiClient.invokeAPI( + localVarPath, + "PUT", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null + ); + } + + /** + * Abruf des Ergebnisprotokolls Abruf des Ergebnisprotokolls + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @return InputStream + * @throws ApiException if fails to make API call + */ + public InputStream protokollAbrufen(@jakarta.annotation.Nonnull final String datentransfernummer) + throws ApiException + { + return this.protokollAbrufen(datentransfernummer, Collections.emptyMap()); + } + + /** + * Abruf des Ergebnisprotokolls Abruf des Ergebnisprotokolls + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @param additionalHeaders additionalHeaders for this call + * @return InputStream + * @throws ApiException if fails to make API call + */ + public InputStream protokollAbrufen( + @jakarta.annotation.Nonnull final String datentransfernummer, + final Map additionalHeaders) throws ApiException + { + final Object localVarPostBody = null; + + // verify the required parameter 'datentransfernummer' is set + if(datentransfernummer == null) + { + throw new ApiException( + 400, + "Missing the required parameter 'datentransfernummer' when calling protokollAbrufen"); + } + + // create path and map variables + final String localVarPath = "/dip/md/v2_1/{datentransfernummer}/protocol" + .replaceAll( + "\\{" + "datentransfernummer" + "\\}", + this.apiClient.escapeString(this.apiClient.parameterToString(datentransfernummer))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + "application/octet-stream" + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + final TypeReference localVarReturnType = new TypeReference<>() + { + }; + return this.apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + + /** + * Erhalt des Protokolls bestätigen Erhalt des Protokolls bestätigen + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @throws ApiException if fails to make API call + */ + public void protokollErhalten(@jakarta.annotation.Nonnull final String datentransfernummer) throws ApiException + { + this.protokollErhalten(datentransfernummer, Collections.emptyMap()); + } + + /** + * Erhalt des Protokolls bestätigen Erhalt des Protokolls bestätigen + * + * @param datentransfernummer Die Datentransfernummer, die die Transaktion identifiziert (required) + * @param additionalHeaders additionalHeaders for this call + * @throws ApiException if fails to make API call + */ + public void protokollErhalten( + @jakarta.annotation.Nonnull final String datentransfernummer, + final Map additionalHeaders) throws ApiException + { + final Object localVarPostBody = null; + + // verify the required parameter 'datentransfernummer' is set + if(datentransfernummer == null) + { + throw new ApiException( + 400, + "Missing the required parameter 'datentransfernummer' when calling protokollErhalten"); + } + + // create path and map variables + final String localVarPath = "/dip/md/v2_1/{datentransfernummer}/protocol" + .replaceAll( + "\\{" + "datentransfernummer" + "\\}", + this.apiClient.escapeString(this.apiClient.parameterToString(datentransfernummer))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + this.apiClient.invokeAPI( + localVarPath, + "PATCH", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null + ); + } + + @Override + public T invokeAPI( + final String url, + final String method, + final Object request, + final TypeReference returnType, + final Map additionalHeaders) throws ApiException + { + final String localVarPath = url.replace(this.apiClient.getBaseURL(), ""); + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList<>(); + final List localVarCollectionQueryParams = new ArrayList<>(); + final Map localVarHeaderParams = new HashMap<>(); + final Map localVarCookieParams = new HashMap<>(); + final Map localVarFormParams = new HashMap<>(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = this.apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = this.apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[]{"BearerAuth"}; + + return this.apiClient.invokeAPI( + localVarPath, + method, + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + request, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + returnType + ); + } +} diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ApiClient.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ApiClient.java index 6955b631..0ac8398a 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ApiClient.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ApiClient.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -56,6 +56,7 @@ import java.util.Date; import java.util.function.Supplier; import java.util.TimeZone; +import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -77,11 +78,12 @@ import java.text.DateFormat; import software.xdev.bzst.dip.client.generated.client.auth.Authentication; +import software.xdev.bzst.dip.client.generated.client.auth.HttpBearerAuth; public class ApiClient extends JavaTimeFormatter { - private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); - private String basePath = "http://localhost"; + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String basePath = "http://localhost"; protected List servers = new ArrayList(Arrays.asList( new ServerConfiguration( "", @@ -91,22 +93,22 @@ public class ApiClient extends JavaTimeFormatter { )); protected Integer serverIndex = 0; protected Map serverVariables = null; - private boolean debugging = false; - private int connectionTimeout = 0; + protected boolean debugging = false; + protected int connectionTimeout = 0; - private CloseableHttpClient httpClient; - private ObjectMapper objectMapper; + protected CloseableHttpClient httpClient; + protected ObjectMapper objectMapper; protected String tempFolderPath = null; - private Map authentications; + protected Map authentications; - private int statusCode; - private Map> responseHeaders; + protected ThreadLocal lastStatusCode = new ThreadLocal<>(); + protected ThreadLocal>> lastResponseHeaders = new ThreadLocal<>(); - private DateFormat dateFormat; + protected DateFormat dateFormat; // Methods that can have a request body - private static List bodyMethods = Arrays.asList("POST", "PUT", "DELETE", "PATCH"); + protected static List bodyMethods = Arrays.asList("POST", "PUT", "DELETE", "PATCH"); public ApiClient(CloseableHttpClient httpClient) { objectMapper = new ObjectMapper(); @@ -118,15 +120,17 @@ public ApiClient(CloseableHttpClient httpClient) { objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); objectMapper.registerModule(new JavaTimeModule()); objectMapper.registerModule(new JsonNullableModule()); + objectMapper.registerModule(new RFC3339JavaTimeModule()); objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat()); dateFormat = ApiClient.buildDefaultDateFormat(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/DIP-MDS 1.3/java"); + setUserAgent("OpenAPI-Generator/DIP-MDS 2.1/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap(); + authentications.put("BearerAuth", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -245,16 +249,18 @@ public ApiClient setServerVariables(Map serverVariables) { * * @return Status code */ + @Deprecated public int getStatusCode() { - return statusCode; + return lastStatusCode.get(); } /** * Gets the response headers of the previous request * @return Response headers */ + @Deprecated public Map> getResponseHeaders() { - return responseHeaders; + return lastResponseHeaders.get(); } /** @@ -286,6 +292,35 @@ public String getTempFolderPath() { return tempFolderPath; } + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + * @return API client + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier the token supplier function + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } @@ -295,7 +330,7 @@ public String getTempFolderPath() { * @param userAgent User agent * @return API client */ - public ApiClient setUserAgent(String userAgent) { + public final ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } @@ -317,7 +352,7 @@ public ApiClient setTempFolderPath(String tempFolderPath) { * @param value The header's value * @return API client */ - public ApiClient addDefaultHeader(String key, String value) { + public final ApiClient addDefaultHeader(String key, String value) { defaultHeaderMap.put(key, value); return this; } @@ -473,7 +508,7 @@ public List parameterToPair(String name, Object value) { * @param value The value of the parameter. * @return A list of {@code Pair} objects. */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { + public List parameterToPairs(String collectionFormat, String name, Collection value) { List params = new ArrayList(); // preconditions @@ -607,7 +642,7 @@ protected Map> transformResponseHeaders(Header[] headers) { /** * Parse content type object from header value */ - private ContentType getContentType(String headerValue) throws ApiException { + protected ContentType getContentType(String headerValue) throws ApiException { try { return ContentType.parse(headerValue); } catch (UnsupportedCharsetException e) { @@ -618,7 +653,7 @@ private ContentType getContentType(String headerValue) throws ApiException { /** * Get content type of a response or null if one was not provided */ - private String getResponseMimeType(HttpResponse response) throws ApiException { + protected String getResponseMimeType(HttpResponse response) throws ApiException { Header contentTypeHeader = response.getFirstHeader("Content-Type"); if (contentTypeHeader != null) { return getContentType(contentTypeHeader.getValue()).getMimeType(); @@ -713,10 +748,11 @@ public T deserialize(CloseableHttpResponse response, TypeReference valueT } return objectMapper.readValue(content, valueType); - } else if ("text/plain".equalsIgnoreCase(mimeType)) { + } else if (mimeType.toLowerCase().startsWith("text/")) { // convert input stream to string return (T) EntityUtils.toString(entity); } else { + Map> responseHeaders = transformResponseHeaders(response.getHeaders()); throw new ApiException( "Deserialization for content type '" + mimeType + "' not supported for type '" + valueType + "'", response.getCode(), @@ -726,7 +762,7 @@ public T deserialize(CloseableHttpResponse response, TypeReference valueT } } - private File downloadFileFromResponse(CloseableHttpResponse response) throws IOException { + protected File downloadFileFromResponse(CloseableHttpResponse response) throws IOException { Header contentDispositionHeader = response.getFirstHeader("Content-Disposition"); String contentDisposition = contentDispositionHeader == null ? null : contentDispositionHeader.getValue(); File file = prepareDownloadFile(contentDisposition); @@ -778,6 +814,7 @@ public String getBaseURL() { if (serverIndex != null) { if (serverIndex < 0 || serverIndex >= servers.size()) { throw new ArrayIndexOutOfBoundsException(String.format( + Locale.ROOT, "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() )); } @@ -797,7 +834,7 @@ public String getBaseURL() { * @param urlQueryDeepObject URL query string of the deep object parameters * @return The full URL */ - private String buildUrl(String path, List queryParams, List collectionQueryParams, String urlQueryDeepObject) { + protected String buildUrl(String path, List queryParams, List collectionQueryParams, String urlQueryDeepObject) { String baseURL = getBaseURL(); final StringBuilder url = new StringBuilder(); @@ -862,12 +899,15 @@ protected Cookie buildCookie(String key, String value, URI uri) { } protected T processResponse(CloseableHttpResponse response, TypeReference returnType) throws ApiException, IOException, ParseException { - statusCode = response.getCode(); + int statusCode = response.getCode(); + lastStatusCode.set(statusCode); if (statusCode == HttpStatus.SC_NO_CONTENT) { return null; } - responseHeaders = transformResponseHeaders(response.getHeaders()); + Map> responseHeaders = transformResponseHeaders(response.getHeaders()); + lastResponseHeaders.set(responseHeaders); + if (isSuccessfulStatus(statusCode)) { return this.deserialize(response, returnType); } else { @@ -973,7 +1013,7 @@ public T invokeAPI( * @param headerParams Header parameters * @param cookieParams Cookie parameters */ - private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ApiException.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ApiException.java index 5de05c34..1583a0ee 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ApiException.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ApiException.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/BaseApi.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/BaseApi.java index efa7982d..b7f8a387 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/BaseApi.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/BaseApi.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/Configuration.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/Configuration.java index 9a44b4ec..39d950af 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/Configuration.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/Configuration.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,28 +13,50 @@ package software.xdev.bzst.dip.client.generated.client; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Supplier; + public class Configuration { - public static final String VERSION = "DIP-MDS 1.3"; - - private static ApiClient defaultApiClient = new ApiClient(); - - /** - * Get the default API client, which would be used when creating API - * instances without providing an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - return defaultApiClient; - } + public static final String VERSION = "DIP-MDS 2.1"; + + private static final AtomicReference defaultApiClient = new AtomicReference<>(); + private static volatile Supplier apiClientFactory = ApiClient::new; - /** - * Set the default API client, which would be used when creating API - * instances without providing an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = apiClient; + /** + * Get the default API client, which would be used when creating API instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + ApiClient client = defaultApiClient.get(); + if (client == null) { + client = defaultApiClient.updateAndGet(val -> { + if (val != null) { // changed by another thread + return val; + } + return apiClientFactory.get(); + }); } -} + return client; + } + + /** + * Set the default API client, which would be used when creating API instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient.set(apiClient); + } + + /** + * set the callback used to create new ApiClient objects + */ + public static void setApiClientFactory(Supplier factory) { + apiClientFactory = Objects.requireNonNull(factory); + } + + private Configuration() { + } +} \ No newline at end of file diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/JavaTimeFormatter.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/JavaTimeFormatter.java index e9838d64..ce34efb1 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/JavaTimeFormatter.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/JavaTimeFormatter.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,43 +21,47 @@ * It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}. */ public class JavaTimeFormatter { + private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; - private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + /** + * Get the date format used to parse/format {@code OffsetDateTime} parameters. + * + * @return DateTimeFormatter + */ + public DateTimeFormatter getOffsetDateTimeFormatter() { + return offsetDateTimeFormatter; + } - /** - * Get the date format used to parse/format {@code OffsetDateTime} parameters. - * @return DateTimeFormatter - */ - public DateTimeFormatter getOffsetDateTimeFormatter() { - return offsetDateTimeFormatter; - } + /** + * Set the date format used to parse/format {@code OffsetDateTime} parameters. + * + * @param offsetDateTimeFormatter {@code DateTimeFormatter} + */ + public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) { + this.offsetDateTimeFormatter = offsetDateTimeFormatter; + } - /** - * Set the date format used to parse/format {@code OffsetDateTime} parameters. - * @param offsetDateTimeFormatter {@code DateTimeFormatter} - */ - public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) { - this.offsetDateTimeFormatter = offsetDateTimeFormatter; + /** + * Parse the given string into {@code OffsetDateTime} object. + * + * @param str String + * @return {@code OffsetDateTime} + */ + public OffsetDateTime parseOffsetDateTime(String str) { + try { + return OffsetDateTime.parse(str, offsetDateTimeFormatter); + } catch (DateTimeParseException e) { + throw new RuntimeException(e); } + } - /** - * Parse the given string into {@code OffsetDateTime} object. - * @param str String - * @return {@code OffsetDateTime} - */ - public OffsetDateTime parseOffsetDateTime(String str) { - try { - return OffsetDateTime.parse(str, offsetDateTimeFormatter); - } catch (DateTimeParseException e) { - throw new RuntimeException(e); - } - } - /** - * Format the given {@code OffsetDateTime} object into string. - * @param offsetDateTime {@code OffsetDateTime} - * @return {@code OffsetDateTime} in string format - */ - public String formatOffsetDateTime(OffsetDateTime offsetDateTime) { - return offsetDateTimeFormatter.format(offsetDateTime); - } -} + /** + * Format the given {@code OffsetDateTime} object into string. + * + * @param offsetDateTime {@code OffsetDateTime} + * @return {@code OffsetDateTime} in string format + */ + public String formatOffsetDateTime(OffsetDateTime offsetDateTime) { + return offsetDateTimeFormatter.format(offsetDateTime); + } +} \ No newline at end of file diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/Pair.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/Pair.java index 7ca049eb..0772127f 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/Pair.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/Pair.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,43 +14,23 @@ package software.xdev.bzst.dip.client.generated.client; public class Pair { - private String name = ""; - private String value = ""; + private final String name; + private final String value; - public Pair (String name, String value) { - setName(name); - setValue(value); - } + public Pair(String name, String value) { + this.name = isValidString(name) ? name : ""; + this.value = isValidString(value) ? value : ""; + } - private void setName(String name) { - if (!isValidString(name)) { - return; - } + public String getName() { + return this.name; + } - this.name = name; - } + public String getValue() { + return this.value; + } - private void setValue(String value) { - if (!isValidString(value)) { - return; - } - - this.value = value; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } - - return true; - } + private static boolean isValidString(String arg) { + return arg != null; + } } diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339DateFormat.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339DateFormat.java index af293037..bf42d07b 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339DateFormat.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339DateFormat.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339InstantDeserializer.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339InstantDeserializer.java new file mode 100644 index 00000000..4ed3e5ca --- /dev/null +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339InstantDeserializer.java @@ -0,0 +1,98 @@ +/* + * dip-mds + * DIP-Massendatenschnittstelle + * + * The version of the OpenAPI document: DIP-MDS 2.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package software.xdev.bzst.dip.client.generated.client; + +import java.io.IOException; +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.Temporal; +import java.time.temporal.TemporalAccessor; +import java.util.function.BiFunction; +import java.util.function.Function; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeFeature; +import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer; + +public class RFC3339InstantDeserializer extends InstantDeserializer { + private final static boolean DEFAULT_NORMALIZE_ZONE_ID = JavaTimeFeature.NORMALIZE_DESERIALIZED_ZONE_ID.enabledByDefault(); + private final static boolean DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + = JavaTimeFeature.ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS.enabledByDefault(); + + public static final RFC3339InstantDeserializer INSTANT = new RFC3339InstantDeserializer<>( + Instant.class, DateTimeFormatter.ISO_INSTANT, + Instant::from, + a -> Instant.ofEpochMilli( a.value ), + a -> Instant.ofEpochSecond( a.integer, a.fraction ), + null, + true, // yes, replace zero offset with Z + DEFAULT_NORMALIZE_ZONE_ID, + DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + ); + + public static final RFC3339InstantDeserializer OFFSET_DATE_TIME = new RFC3339InstantDeserializer<>( + OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, + OffsetDateTime::from, + a -> OffsetDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ), + a -> OffsetDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ), + (d, z) -> ( d.isEqual( OffsetDateTime.MIN ) || d.isEqual( OffsetDateTime.MAX ) ? + d : + d.withOffsetSameInstant( z.getRules().getOffset( d.toLocalDateTime() ) ) ), + true, // yes, replace zero offset with Z + DEFAULT_NORMALIZE_ZONE_ID, + DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + ); + + public static final RFC3339InstantDeserializer ZONED_DATE_TIME = new RFC3339InstantDeserializer<>( + ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, + ZonedDateTime::from, + a -> ZonedDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ), + a -> ZonedDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ), + ZonedDateTime::withZoneSameInstant, + false, // keep zero offset and Z separate since zones explicitly supported + DEFAULT_NORMALIZE_ZONE_ID, + DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + ); + + protected RFC3339InstantDeserializer( + Class supportedType, + DateTimeFormatter formatter, + Function parsedToValue, + Function fromMilliseconds, + Function fromNanoseconds, + BiFunction adjust, + boolean replaceZeroOffsetAsZ, + boolean normalizeZoneId, + boolean readNumericStringsAsTimestamp) { + super( + supportedType, + formatter, + parsedToValue, + fromMilliseconds, + fromNanoseconds, + adjust, + replaceZeroOffsetAsZ, + normalizeZoneId, + readNumericStringsAsTimestamp + ); + } + + @Override + protected T _fromString(JsonParser p, DeserializationContext ctxt, String string0) throws IOException { + return super._fromString(p, ctxt, string0.replace( ' ', 'T' )); + } +} \ No newline at end of file diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339JavaTimeModule.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339JavaTimeModule.java new file mode 100644 index 00000000..64ca674e --- /dev/null +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/RFC3339JavaTimeModule.java @@ -0,0 +1,36 @@ +/* + * dip-mds + * DIP-Massendatenschnittstelle + * + * The version of the OpenAPI document: DIP-MDS 2.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package software.xdev.bzst.dip.client.generated.client; + +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZonedDateTime; + +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.Module.SetupContext; + +public class RFC3339JavaTimeModule extends SimpleModule { + public RFC3339JavaTimeModule() { + super("RFC3339JavaTimeModule"); + } + + @Override + public void setupModule(SetupContext context) { + super.setupModule(context); + + addDeserializer(Instant.class, RFC3339InstantDeserializer.INSTANT); + addDeserializer(OffsetDateTime.class, RFC3339InstantDeserializer.OFFSET_DATE_TIME); + addDeserializer(ZonedDateTime.class, RFC3339InstantDeserializer.ZONED_DATE_TIME); + } + +} diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ServerConfiguration.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ServerConfiguration.java index f0f728c3..52649210 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ServerConfiguration.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ServerConfiguration.java @@ -1,3 +1,16 @@ +/* + * dip-mds + * DIP-Massendatenschnittstelle + * + * The version of the OpenAPI document: DIP-MDS 2.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package software.xdev.bzst.dip.client.generated.client; import java.util.Map; diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ServerVariable.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ServerVariable.java index dcbef937..fd16ba0c 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ServerVariable.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/ServerVariable.java @@ -1,3 +1,16 @@ +/* + * dip-mds + * DIP-Massendatenschnittstelle + * + * The version of the OpenAPI document: DIP-MDS 2.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package software.xdev.bzst.dip.client.generated.client; import java.util.HashSet; diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/StringUtil.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/StringUtil.java index fb7ec499..e04f6d02 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/StringUtil.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/StringUtil.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/ApiKeyAuth.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/ApiKeyAuth.java index 06b9a5c7..4a17c202 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/ApiKeyAuth.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/Authentication.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/Authentication.java index d0ac58e9..1ba7727a 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/Authentication.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/Authentication.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -19,12 +19,12 @@ import java.util.List; public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - */ - void applyToParams(List queryParams, Map headerParams, Map cookieParams); + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/HttpBasicAuth.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/HttpBasicAuth.java index f9009051..619b5159 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/HttpBasicAuth.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/HttpBearerAuth.java b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/HttpBearerAuth.java index 540ab8f4..8a5b7807 100644 --- a/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/HttpBearerAuth.java +++ b/bzst-dip-java-client/src/generated/java/software/xdev/bzst/dip/client/generated/client/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * dip-mds * DIP-Massendatenschnittstelle * - * The version of the OpenAPI document: DIP-MDS 1.3 + * The version of the OpenAPI document: DIP-MDS 2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.function.Supplier; public class HttpBearerAuth implements Authentication { @@ -25,7 +24,7 @@ public class HttpBearerAuth implements Authentication { private Supplier tokenSupplier; public HttpBearerAuth(String scheme) { - this.scheme = scheme; + this.scheme = upperCaseBearer(scheme); } /** @@ -57,15 +56,14 @@ public void setBearerToken(Supplier tokenSupplier) { @Override public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { - String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + String bearerToken = tokenSupplier != null ? tokenSupplier.get() : null; if (bearerToken == null) { return; } - - headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + headerParams.put("Authorization", (scheme != null ? scheme + " " : "") + bearerToken); } private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + return "bearer".equalsIgnoreCase(scheme) ? "Bearer" : scheme; } } diff --git a/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/BzstDipClient.java b/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/BzstDipClient.java index 00c667ca..ed09da16 100644 --- a/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/BzstDipClient.java +++ b/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/BzstDipClient.java @@ -23,7 +23,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import software.xdev.bzst.dip.client.generated.api.MdEinreichenProviderApi; +import software.xdev.bzst.dip.client.generated.api.MdsProviderV21Api; import software.xdev.bzst.dip.client.generated.client.ApiClient; import software.xdev.bzst.dip.client.model.configuration.BzstDipConfiguration; import software.xdev.bzst.dip.client.model.message.cesop.BzstCesopPaymentDataBody; @@ -64,9 +64,9 @@ public BzstDipClient(final BzstDipConfiguration configuration, final ApiClient a public BzstDipClient( final BzstDipConfiguration configuration, - final MdEinreichenProviderApi mdEinreichenProviderApi) + final MdsProviderV21Api mdsProviderV21Api) { - this(configuration, new WebClient(configuration, mdEinreichenProviderApi)); + this(configuration, new WebClient(configuration, mdsProviderV21Api)); } public BzstDipClient(final BzstDipConfiguration configuration, final WebClient webClient) diff --git a/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/webclient/BearerTokenRequester.java b/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/webclient/BearerTokenRequester.java index b3181330..b88b183f 100644 --- a/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/webclient/BearerTokenRequester.java +++ b/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/webclient/BearerTokenRequester.java @@ -29,7 +29,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import io.jsonwebtoken.Jwts; -import software.xdev.bzst.dip.client.generated.api.MdEinreichenProviderApi; +import software.xdev.bzst.dip.client.generated.api.MdsProviderV21Api; import software.xdev.bzst.dip.client.model.configuration.BzstDipConfiguration; @@ -42,12 +42,12 @@ public class BearerTokenRequester private static final String BEARER_STRING = "Bearer "; public static final String MDS_POSTFIX = "/auth/realms/mds"; - private final MdEinreichenProviderApi client; + private final MdsProviderV21Api client; private final BzstDipConfiguration configuration; public BearerTokenRequester( final BzstDipConfiguration configuration, - final MdEinreichenProviderApi client + final MdsProviderV21Api client ) { this.configuration = configuration; diff --git a/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/webclient/WebClient.java b/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/webclient/WebClient.java index e79217ec..8a9ecee6 100644 --- a/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/webclient/WebClient.java +++ b/bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/webclient/WebClient.java @@ -25,7 +25,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import software.xdev.bzst.dip.client.generated.api.MdEinreichenProviderApi; +import software.xdev.bzst.dip.client.generated.api.MdsProviderV21Api; import software.xdev.bzst.dip.client.generated.client.ApiClient; import software.xdev.bzst.dip.client.model.configuration.BzstDipConfiguration; import software.xdev.bzst.dip.client.model.message.dac7.BzstDipRequestStatusResult; @@ -41,26 +41,37 @@ public class WebClient private static final Logger LOGGER = LoggerFactory.getLogger(WebClient.class); public static final int OK_HTTP_STATUS_CODE = 200; - private final MdEinreichenProviderApi client; + private final BzstDipConfiguration configuration; + private final MdsProviderV21Api client; private final BearerTokenRequester bearerTokenRequester; public WebClient(final BzstDipConfiguration configuration) { - this(configuration, new MdEinreichenProviderApi()); - this.client.getApiClient().setBasePath(configuration.getRealmEnvironmentBaseUrl()); + this(configuration, new ApiClient()); } - public WebClient(final BzstDipConfiguration configuration, final ApiClient apiClient) + public WebClient( + final BzstDipConfiguration configuration, + final ApiClient apiClient) { - this(configuration, new MdEinreichenProviderApi(apiClient)); + this.configuration = configuration; + apiClient.setBasePath(configuration.getRealmEnvironmentBaseUrl()); + + this.client = new MdsProviderV21Api(apiClient); + + this.bearerTokenRequester = new BearerTokenRequester(configuration, new MdsProviderV21Api(apiClient)); + apiClient.setBearerToken(this.bearerTokenRequester::getAccessToken); } public WebClient( final BzstDipConfiguration configuration, - final MdEinreichenProviderApi mdEinreichenProviderApi) + final MdsProviderV21Api mdsProviderV21Api) { - this.client = mdEinreichenProviderApi; - this.bearerTokenRequester = new BearerTokenRequester(configuration, this.client); + this.configuration = configuration; + this.client = mdsProviderV21Api; + this.bearerTokenRequester = new BearerTokenRequester( + configuration, + new MdsProviderV21Api(mdsProviderV21Api.getApiClient())); } /** @@ -68,27 +79,21 @@ public WebClient( */ public String getDataTransferNumber() { - return this.getDataTransferNumber("DAC7"); + return this.getDataTransferNumber(this.configuration.getApplicationCode()); } public String getDataTransferNumber(final String fachverfahren) { LOGGER.debug("Getting data transfer number..."); - return this.client.einreichungAnmelden( - fachverfahren, - this.bearerTokenRequester.getAccessTokenWithBearerPrefix() - ); + return this.client.einreichungAnmelden(fachverfahren); } public void uploadMassData(final String dataTransferNumber, final String xmlString) { LOGGER.debug("Uploading the xml data..."); - this.client.massendatenEinreichen( - dataTransferNumber, - this.bearerTokenRequester.getAccessTokenWithBearerPrefix(), - new ByteArrayInputStream(xmlString.getBytes()) - ); + final InputStream inputStream = new ByteArrayInputStream(xmlString.getBytes(StandardCharsets.UTF_8)); + this.client.massendatenEinreichen(dataTransferNumber, inputStream); LOGGER.debug("Uploaded data successfully!"); } @@ -99,10 +104,7 @@ public void uploadMassData(final String dataTransferNumber, final String xmlStri public void closeSubmission(final String dataTransferNumber) { LOGGER.debug("Closing submission..."); - this.client.einreichungBeenden( - dataTransferNumber, - this.bearerTokenRequester.getAccessTokenWithBearerPrefix() - ); + this.client.einreichungBeenden(dataTransferNumber); LOGGER.debug("Closed submission successfully!"); } @@ -114,9 +116,7 @@ public void closeSubmission(final String dataTransferNumber) public List requestResultLogs() throws IOException { try( - final InputStream inputStream = this.client.alleProtokollnummern( - this.bearerTokenRequester.getAccessTokenWithBearerPrefix() - ) + final InputStream inputStream = this.client.alleProtokollnummern() ) { final String responseBody = new String(inputStream.readAllBytes(), StandardCharsets.UTF_8); @@ -136,9 +136,7 @@ public BzstDipSingleTransferResult requestTransferResult(final String dataTransf { try( final InputStream inputStream = this.client.protokollAbrufen( - dataTransferNumber, - this.bearerTokenRequester.getAccessTokenWithBearerPrefix() - ) + dataTransferNumber) ) { // TODO: Check text @@ -153,20 +151,14 @@ public BzstDipSingleTransferResult requestTransferResult(final String dataTransf */ public BzstDipSingleTransferResult confirmTransfer(final String dataTransferNumber) { - this.client.protokollErhalten( - dataTransferNumber, - this.bearerTokenRequester.getAccessTokenWithBearerPrefix() - ); + this.client.protokollErhalten(dataTransferNumber); return new BzstDipSingleTransferResult(dataTransferNumber, OK_HTTP_STATUS_CODE); } public void abortSubmission(final String dataTransferNumber) { LOGGER.error("Aborting submission..."); - this.client.einreichungAbbrechen( - dataTransferNumber, - this.bearerTokenRequester.getAccessTokenWithBearerPrefix() - ); + this.client.einreichungAbbrechen(dataTransferNumber); LOGGER.debug("Aborted successfully."); } @@ -207,4 +199,11 @@ private BzstDipSingleTransferResult requestSingleTransferAndConfirm(final String } return singleTransferResult; } + + public void uploadAttachment(final String dataTransferNumber, final InputStream attachment) + { + LOGGER.debug("Uploading attachment..."); + this.client.anhangEinreichen(dataTransferNumber, attachment); + LOGGER.debug("Uploaded attachment successfully!"); + } } diff --git a/openapi/INFO.md b/openapi/INFO.md index 33a3e696..7480152c 100644 --- a/openapi/INFO.md +++ b/openapi/INFO.md @@ -1,4 +1,6 @@ -This ``openapi.yml`` is based on the [official available one](https://www.bzst.de/SharedDocs/Downloads/DE/EOP_BOP/dip_open_api.yaml) with minor modifications. +This ``openapi.yml`` is based on +the [official available one](https://www.bzst.de/SharedDocs/Downloads/EN/EOP_BOP/dip_open_api_zip_version_2_1.7z?__blob=publicationFile&v=3) +with minor modifications. The Java API Client can be generated using ``mvn clean compile -P openapi-generator`` inside [``bzst-dip-java-client``](../bzst-dip-java-client/). diff --git a/openapi/openapi.yml b/openapi/openapi.yml index 8f30794a..4bfdf15f 100644 --- a/openapi/openapi.yml +++ b/openapi/openapi.yml @@ -1,16 +1,25 @@ -openapi: 3.0.1 +openapi: 3.0.3 info: title: dip-mds description: DIP-Massendatenschnittstelle - version: DIP-MDS 1.3 + version: DIP-MDS 2.1 tags: - - name: MdEinreichenProvider + - name: MDSProviderV2_1 description: Einreichen von Massendatenlieferungen +components: + securitySchemes: + BearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: "Authorization token (Bearer )" +security: + - BearerAuth: [ ] paths: - /dip/start/{fachverfahren}: + /dip/md/v2_1/start/{fachverfahren}: post: tags: - - MdEinreichenProvider + - MDSProviderV2_1 summary: Anfordern einer Datentransfernummer und Einleiten einer Massendatenlieferung description: >- Anfordern einer Datentransfernummer zur Identifikation der Lieferung und Einleiten einer Massendatenlieferung @@ -22,10 +31,6 @@ paths: required: true schema: type: string - - name: Authorization - schema: - type: string - in: header responses: '201': description: Datentransfer erfolgreich initiiert @@ -41,10 +46,10 @@ paths: description: Der Client hat zu viele Anfragen in einem bestimmten Zeitraum gesendet '500': description: Interner Fehler - /dip/md/{datentransfernummer}/xml: + /dip/md/v2_1/{datentransfernummer}/xml: put: tags: - - MdEinreichenProvider + - MDSProviderV2_1 summary: Einreichung des XML description: >- Einreichung der Daten-XML unter Angabe einer Datentransfernummer @@ -56,10 +61,6 @@ paths: required: true schema: type: string - - name: Authorization - schema: - type: string - in: header requestBody: description: >- Einreichung der Daten-XML unter Angabe einer Datentransfernummer @@ -74,16 +75,18 @@ paths: description: Ungültige Datentransfernummer '401': description: Ungültiger Authorization Header + '409': + description: Ungültige Schnittstellen Version '410': description: Datentransfer wurde bereits beendet '424': description: Der Datenübermittler ist dem Vorgang nicht zugeordnet '500': description: Interner Fehler - /dip/md/{datentransfernummer}/attachment: + /dip/md/v2_1/{datentransfernummer}/attachment: put: tags: - - MdEinreichenProvider + - MDSProviderV2_1 summary: Einreichung zusätzlicher Anhänge description: >- Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer @@ -95,10 +98,6 @@ paths: required: true schema: type: string - - name: Authorization - schema: - type: string - in: header requestBody: description: >- Einreichung zusätzlicher Anhänge unter Angabe einer Datentransfernummer @@ -113,14 +112,16 @@ paths: description: Ungültige Datentransfernummer '401': description: Ungültiger Authorization Header + '409': + description: Ungültige Schnittstellen Version '424': description: Der Datenübermittler ist dem Vorgang nicht zugeordnet '500': description: Interner Fehler - /dip/md/{datentransfernummer}/finish: + /dip/md/v2_1/{datentransfernummer}/finish: patch: tags: - - MdEinreichenProvider + - MDSProviderV2_1 summary: Erklärung, dass die Massendatenlieferung abgeschlossen ist description: >- Erklärung der Fertigstellung der Massendatenlieferung @@ -132,10 +133,6 @@ paths: required: true schema: type: string - - name: Authorization - schema: - type: string - in: header responses: '200': description: Anfrage erfolgreich @@ -143,16 +140,18 @@ paths: description: Ungültige Datentransfernummer '401': description: Ungültiger Authorization Header + '409': + description: Ungültige Schnittstellen Version '410': description: Datentransfer wurde bereits beendet '424': description: Der Datenübermittler ist dem Vorgang nicht zugeordnet '500': description: Interner Fehler - /dip/md/{datentransfernummer}/abort: + /dip/md/v2_1/{datentransfernummer}/abort: patch: tags: - - MdEinreichenProvider + - MDSProviderV2_1 summary: Abbruch der laufenden Übertragung und Verwerfen der bisher übertragenen Dateien description: >- Verkünden der Absicht, die laufende Massendatenlieferung abzubrechen und die übertragenen Dateien zu verwerfen @@ -164,10 +163,6 @@ paths: required: true schema: type: string - - name: Authorization - schema: - type: string - in: header responses: '200': description: Anfrage erfolgreich @@ -175,16 +170,18 @@ paths: description: Ungültige Datentransfernummer '401': description: Ungültiger Authorization Header + '409': + description: Ungültige Schnittstellen Version '410': description: Datentransfer wurde bereits beendet '424': description: Der Datenübermittler ist dem Vorgang nicht zugeordnet '500': description: Interner Fehler - /dip/md/{datentransfernummer}/protocol: + /dip/md/v2_1/{datentransfernummer}/protocol: get: tags: - - MdEinreichenProvider + - MDSProviderV2_1 summary: Abruf des Ergebnisprotokolls description: Abruf des Ergebnisprotokolls operationId: protokollAbrufen @@ -195,10 +192,6 @@ paths: required: true schema: type: string - - name: Authorization - schema: - type: string - in: header responses: '200': description: Anfrage erfolgreich @@ -210,6 +203,8 @@ paths: description: Ungültige Datentransfernummer '401': description: Ungültiger Authorization Header + '409': + description: Ungültige Schnittstellen Version '404': description: Protokoll liegt nicht vor '424': @@ -218,7 +213,7 @@ paths: description: Interner Fehler patch: tags: - - MdEinreichenProvider + - MDSProviderV2_1 summary: Erhalt des Protokolls bestätigen description: Erhalt des Protokolls bestätigen operationId: protokollErhalten @@ -229,10 +224,6 @@ paths: required: true schema: type: string - - name: Authorization - schema: - type: string - in: header responses: '200': description: Anfrage erfolgreich @@ -246,18 +237,13 @@ paths: description: Der Datenübermittler ist dem Vorgang nicht zugeordnet '500': description: Interner Fehler - /dip/md/protocolnumbers: + /dip/md/v2_1/protocolnumbers: get: tags: - - MdEinreichenProvider + - MDSProviderV2_1 summary: Abruf einer Liste aller Datentransfernummern mit verfügbarem Protokoll description: Abruf einer Liste aller Datentransfernummern mit verfügbarem Protokoll operationId: alleProtokollnummern - parameters: - - name: Authorization - schema: - type: string - in: header responses: '200': description: Anfrage erfolgreich @@ -269,3 +255,21 @@ paths: description: Ungültiger Authorization Header '500': description: Interner Fehler + /dip/md/v2_1/opennumbers: + get: + tags: + - MDSProviderV2_1 + summary: Abruf einer Liste aller Datentransfernummern, für die das Protokoll noch aussteht + description: Abruf einer Liste aller Datentransfernummern, für die das Protokoll noch aussteht + operationId: alleOffenenDatentransfernummern + responses: + '200': + description: Anfrage erfolgreich + content: + application/octet-stream: + schema: + type: InputStream + '401': + description: Ungültiger Authorization Header + '500': + description: Interner Fehler \ No newline at end of file