diff --git a/src/SOL021/.gitkeep b/src/SOL021/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/SOL021/APIVersion/.gitkeep b/src/SOL021/APIVersion/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/SOL021/APIVersion/APIVersion.yaml b/src/SOL021/APIVersion/APIVersion.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a8e561e958f6a0cd0bc2d52f295726b4734721b4 --- /dev/null +++ b/src/SOL021/APIVersion/APIVersion.yaml @@ -0,0 +1,27 @@ +openapi: 3.0.2 + +info: + title: SOL021 - API version interface + description: | + SOL021 - API version Interface + + IMPORTANT: Please note that this file might be not aligned to the current + version of the ETSI Group Specification it refers to. In case of + discrepancies the published ETSI Group Specification takes precedence. + + Please report bugs to Please report bugs to https://forge.etsi.org/rep/nfv/SOL021/issues + + contact: + name: NFV-SOL WG + license: + name: ETSI Forge copyright notice + url: https://forge.etsi.org/etsi-forge-copyright-notice.txt + version: 1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1 + +servers: + - url: http://127.0.0.1/ + - url: https://127.0.0.1/ + +paths: + /nfvintent/api_versions: + $ref: ../endpoints/SOL021_endpoints.yaml#/endpoints/api_versions diff --git a/src/SOL021/IntentManagement/.gitkeep b/src/SOL021/IntentManagement/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/SOL021/IntentManagement/IntentManagement.yaml b/src/SOL021/IntentManagement/IntentManagement.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c19b069e06113d7a2289f387c6e058a255f0a213 --- /dev/null +++ b/src/SOL021/IntentManagement/IntentManagement.yaml @@ -0,0 +1,237 @@ +openapi: 3.0.2 +info: + version: "1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1" + title: ETSI GS NFV-SOL 021 Intent Management Service API + description: | + SOL021 - Intent management service API + + IMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification + it refers to. In case of discrepancies the published ETSI Group Specification takes precedence. + + Please report bugs to https://forge.etsi.org/rep/nfv/SOL021/issues + license: + name: ETSI Forge copyright notice + url: https://forge.etsi.org/etsi-forge-copyright-notice.txt +servers: + - url: http://127.0.0.1/nfvintent/v1 + - url: https://127.0.0.1/nfvintent/v1 +paths: + "/intents": + post: + description: The POST method creates an NFV intent object instance. + requestBody: + description: The description of the intent to be created. + content: + application/json: + schema: + $ref: '#/components/schemas/Intent' + required: true + responses: + "201": + description: Successful creation of the NFV intent object instance. + content: + application/json: + schema: + $ref: '#/components/schemas/Intent' + "400": + $ref: "../responses/SOL021_resp.yaml#/responses/400" + "404": + $ref: "../responses/SOL021_resp.yaml#/responses/404" + get: + description: The GET method queries information about multiple NFV intents. + parameters: + - $ref: "../components/SOL021_params.yaml#/components/parameters/Filter" + - $ref: "../components/SOL021_params.yaml#/components/parameters/AllFields" + - $ref: "../components/SOL021_params.yaml#/components/parameters/Fields" + - $ref: "../components/SOL021_params.yaml#/components/parameters/ExcludeFields" + - $ref: "../components/SOL021_params.yaml#/components/parameters/NextPage" + responses: + "200": + description: Successful query of the intents. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Intent' + "400": + $ref: "../responses/SOL021_resp.yaml#/responses/400" + "404": + $ref: "../responses/SOL021_resp.yaml#/responses/404" + "/intents/{intentId}": + parameters: + - $ref: "../components/SOL021_params.yaml#/components/parameters/IntentId" + get: + description: The GET method queries information about an NFV intent. + responses: + "200": + description: Successful query of the individual intent. + content: + application/json: + schema: + $ref: '#/components/schemas/Intent' + "400": + $ref: "../responses/SOL021_resp.yaml#/responses/400" + "404": + $ref: "../responses/SOL021_resp.yaml#/responses/404" + patch: + description: The PATCH method modifies an intent. + requestBody: + description: The modifications for the intent object instance. + content: + application/json: + schema: + $ref: '#/components/schemas/IntentModifications' + required: true + responses: + "200": + description: Successful modifications of the individual intent. + content: + application/json: + schema: + $ref: '#/components/schemas/Intent' + "400": + $ref: "../responses/SOL021_resp.yaml#/responses/400" + "404": + $ref: "../responses/SOL021_resp.yaml#/responses/404" + "412": + $ref: "../responses/SOL021_resp.yaml#/responses/412" + "422": + $ref: "../responses/SOL021_resp.yaml#/responses/422" + delete: + description: The DELETE method deletes an individual intent. + responses: + "204": + description: Successful deletion of the intent. + "404": + $ref: "../responses/SOL021_resp.yaml#/responses/404" +components: + schemas: + Intent: + type: object + properties: + intentId: + description: Identifier of the intent. Assigned by the Intent Owner. + type: string + format: uuid + example: 550e8400-e29b-41d4-a716-446655440000 + intentName: + description: Name of the intent. + type: string + example: NetworkServiceDeployment001 + intentExpectations: + $ref: "#/components/schemas/IntentExpectation" + intentContexts: + $ref: "#/components/schemas/IntentContext" + IntentModifications: + type: object + properties: + intentName: + description: Name of the intent. + type: string + example: NetworkServiceDeployment001 + intentExpectations: + $ref: "#/components/schemas/IntentExpectation" + intentContexts: + $ref: "#/components/schemas/IntentContext" + IntentExpectation: + type: object + properties: + expectationId: + description: Identifier of the intent expectation. + type: string + format: uuid + example: 550e8400-e29b-41d4-a716-446655440001 + expectationName: + description: Human readable name of the intent expectation. + type: string + example: tbd + expectationType: + description: Type of the intent expectation. + type: string + example: tbd + expectationObject: + $ref: "#/components/schemas/ExpectationObject" + expectationTarget: + $ref: "#/components/schemas/ExpectationTarget" + expectationContexts: + $ref: "#/components/schemas/Context" + IntentContext: + type: object + properties: + contextId: + description: The identifier of this context. + type: string + format: uuid + example: tbd + contextName: + description: Name of the context. + type: string + example: tbd + contextConditions: + $ref: "#/components/schemas/Condition" + ExpectationObject: + type: object + properties: + objectType: + description: Type of the object of the intent expectation that are expected to be applied on. + type: string + example: tbd + objectInstanceId: + description: Identifier of a specific object instance managed by NFV-MANO to which the intent expectation applies. + type: string + format: uuid + example: tbd + objectFilter: + description: The constraints and conditions to be used as filter information to identify the managed objects to which a given intent expectation applies. + type: string + example: tbd + ExpectationTarget: + type: object + properties: + targetId: + description: The identifier of this expectation target. + type: string + format: uuid + example: tbd + targetName: + description: Name of the expectation target. + type: string + targetConditions: + $ref: "#/components/schemas/Condition" + targetContexts: + $ref: "#/components/schemas/Context" + Context: + type: object + properties: + contextId: + description: The identifier of the context. + type: string + format: uuid + example: tbd + contextName: + description: Name of the context. + type: string + contextConditions: + $ref: "#/components/schemas/Condition" + Condition: + type: object + properties: + conditionId: + description: The identifier of the condition. + type: string + format: uuid + example: tbd + conditionName: + description: Name of the condition. + type: string + operator: + description: If conditionValue exists, represents the specific operator for condition. If conditionList exists, represents the relationship between all conditions. + type: string + example: tbd + conditionValue: + description: For a simple condition, represents the specific value that composes the condition. Either conditionValue or conditionList, but not both, shall be present. + type: string + example: tbd + conditionList: + $ref: "#/components/schemas/Condition" \ No newline at end of file diff --git a/src/SOL021/components/.gitkeep b/src/SOL021/components/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/SOL021/components/SOL021_params.yaml b/src/SOL021/components/SOL021_params.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3674749d0f2ab46ad95a07729a426c7b5b71ccaf --- /dev/null +++ b/src/SOL021/components/SOL021_params.yaml @@ -0,0 +1,239 @@ +components: + schemas: + Intent: + type: object + required: + - intentId + - intentName + properties: + intentId: + description: Identifier of the intent. Assigned by the Intent Owner. + type: string + format: uuid + example: "550e8400-e29b-41d4-a716-446655440000" + intentName: + description: Name of the intent. + type: string + example: "NetworkServiceDeployment001" + intentExpectations: + type: array + items: + $ref: "#/components/schemas/IntentExpectation" + intentContexts: + type: array + items: + $ref: "#/components/schemas/IntentContext" + IntentModifications: + type: object + properties: + intentName: + description: Name of the intent. + type: string + example: "NetworkServiceDeployment001" + intentExpectations: + type: array + items: + $ref: "#/components/schemas/IntentExpectation" + IntentExpectation: + type: object + required: + - expectationId + - expectationName + properties: + expectationId: + description: Identifier of the intent expectation. + type: string + format: uuid + example: "550e8400-e29b-41d4-a716-446655440001" + expectationName: + description: Human readable name of the intent expectation. + type: string + example: "tbd" + expectationType: + description: Type of the intent expectation. + type: string + example: "tbd" + expectationObject: + type: array + items: + $ref: "#/components/schemas/ExpectationObject" + expectationTarget: + type: array + items: + $ref: "#/components/schemas/ExpectationTarget" + expectationContexts: + type: array + items: + $ref: "#/components/schemas/Context" + IntentContext: + type: object + required: + - contextId + - contextName + properties: + contextId: + description: The identifier of this context. + type: string + format: uuid + example: "550e8400-e29b-41d4-a716-446655440003" + contextName: + description: Name of the context. + type: string + example: "tbd" + contextConditions: + type: array + items: + $ref: "#/components/schemas/Condition" + ExpectationObject: + type: object + required: + - objectInstanceId + properties: + objectType: + description: Type of the object of the intent expectation that are expected to be applied on. + type: string + example: "tbd" + objectInstanceId: + description: Identifier of a specific object instance managed by NFV-MANO to which the intent expectation applies. + type: string + format: uuid + example: "550e8400-e29b-41d4-a716-446655440004" + objectFilter: + description: The constraints and conditions to be used as filter information to identify the managed objects to which a given intent expectation applies. + type: string + example: "tbd" + ExpectationTarget: + type: object + required: + - targetId + properties: + targetId: + description: The identifier of this expectation target. + type: string + format: uuid + example: "550e8400-e29b-41d4-a716-446655440005" + targetName: + description: Name of the expectation target. + type: string + targetConditions: + type: array + items: + $ref: "#/components/schemas/Condition" + targetContexts: + type: array + items: + $ref: "#/components/schemas/Context" + Context: + type: object + required: + - contextId + properties: + contextId: + description: The identifier of the context. + type: string + format: uuid + example: "550e8400-e29b-41d4-a716-446655440006" + contextName: + description: Name of the context. + type: string + contextConditions: + type: array + items: + $ref: "#/components/schemas/Condition" + Condition: + type: object + required: + - conditionId + properties: + conditionId: + description: The identifier of the condition. + type: string + format: uuid + example: "550e8400-e29b-41d4-a716-446655440007" + conditionName: + description: Name of the condition. + type: string + operator: + description: If conditionValue exists, represents the specific operator for condition. If conditionList exists, represents the relationship between all conditions. + type: string + example: "tbd" + conditionValue: + description: For a simple condition, represents the specific value that composes the condition. Either conditionValue or conditionList, but not both, shall be present. + type: string + example: "tbd" + conditionList: + type: array + items: + $ref: "#/components/schemas/Condition" + oneOf: + - required: [conditionValue] + - required: [conditionList] + ProblemDetails: + description: The definition of the general "ProblemDetails" data structure from IETF RFC 7807 is reproduced in this structure. Compared to IETF RFC 7807, the "status" and "detail" attributes are mandated to be included by the present document. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. + type: object + required: + - status + - detail + properties: + type: + description: A URI reference according to IETF RFC 3986 that identifies the problem type. + type: string + format: uri + title: + description: A short, human-readable summary of the problem type. + type: string + status: + description: The HTTP status code for this occurrence of the problem. + type: integer + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + instance: + description: A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced. + type: string + format: uri + parameters: + IntentId: + in: path + name: intentId + description: Identifier of the intent. + required: true + schema: + type: string + Filter: + in: query + name: filter + description: Attribute-based filtering expression. All attribute names that appear in the Intent and in data types referenced from it shall be supported by the API producer in the filter expression. + required: false + schema: + type: string + AllFields: + in: query + name: all_fields + description: Include all complex attributes in the response. + required: false + schema: + type: string + Fields: + in: query + name: fields + description: Complex attributes to be included into the response. + required: false + schema: + type: string + example: "fields=intentId,intentExpectation/expectationName" + ExcludeFields: + in: query + name: exclude_fields + description: Complex attributes to be excluded from the response. + required: false + schema: + type: string + example: "exclude_fields=intentContexts" + NextPage: + in: query + name: nextpage_opaque_maker + description: Marker to obtain the next page of a paged response. + required: false + schema: + type: string diff --git a/src/SOL021/definitions/.gitkeep b/src/SOL021/definitions/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/SOL021/definitions/SOL021_def.yaml b/src/SOL021/definitions/SOL021_def.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1d92903e149ee4d3885ff0c49ae92e7f51145873 --- /dev/null +++ b/src/SOL021/definitions/SOL021_def.yaml @@ -0,0 +1,336 @@ +definitions: + schemas: + Link: + description: > + This type represents a link to a resource using an absolute URI. + type: object + required: + - href + properties: + href: + description: > + URI of another resource referenced from a resource. + Shall be an absolute URI (i.e. a UTI that contains {apiRoot}). + $ref: "#/definitions/schemas/Uri" + + NotificationLink: + description: > + This type represents a link to a resource in a notification, using an absolute or relative URI. + type: object + required: + - href + properties: + href: + description: > + URI of a resource referenced from a notification. + Should be an absolute URI (i.e. a URI that contains + {apiRoot}), however, may be a relative URI (i.e. a URI + where the {apiRoot} part is omitted) if the {apiRoot} + information is not available. + $ref: "#/definitions/schemas/Uri" + + IpAddress: + description: > + An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal + integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that + consists of groups of zero to four hexadecimal digits, separated by colons. + type: string + format: IP + + KeyValuePairs: + description: > + This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, + a set of key value pairs is represented as an object. It shall comply with the provisions defined in clause 4 + of IETF RFC 8259. In the following example, a list of key-value pairs with four keys ("aString", "aNumber", + "anArray" and "anObject") is provided to illustrate that the values associated with different keys can be of + different type. + type: object + + ApiVersionInformation: + description: > + This type represents API version information. + type: object + required: + - uriPrefix + - apiVersions + properties: + uriPrefix: + description: > + Specifies the URI prefix for the API, in the following + form {apiRoot}/{apiName}/{apiMajorVersion}/. + type: string + apiVersions: + description: > + Version(s) supported for the API signaled by the + uriPrefix attribute. + type: array + items: + type: object + required: + - version + properties: + version: + description: > + Identifies a supported version. The value of the + version attribute shall be a version identifier as + specified in clause 9.1 (SOL013). + type: string + isDeprecated: + description: | + If such information is available, this attribute indicates + whether use of the version signaled by the version + attribute is deprecated (true) or not (false). + + A deprecated version is still supported by the API producer but is recommended + not to be used any longer. + When a version is no longer supported, it does not appear in the response body. + type: boolean + retirementDate: + description: > + The date and time after which the API version will no + longer be supported. + This attribute may be included if the value of the + isDeprecated attribute is set to true and shall be + absent otherwise. + $ref: "#/definitions/schemas/DateTime" + + Identifier: + description: > + An identifier with the intention of being globally unique. + type: string + + IdentifierLocal: + description: > + An identifier that is unique within a limited local scope other than above listed identifiers, + such as within a complex data structure or within a request-response pair. + Representation: string of variable length. + type: string + + DateTime: + description: > + Date-time stamp. + Representation: String formatted according to IETF RFC 3339. + type: string + format: date-time + + Uri: + description: > + String formatted according to IETF RFC 3986. + type: string + + Boolean: + description: > + The Boolean is a data type having two values (true and false). + type: boolean + + Version: + description: > + A version. + type: string + + String: + description: > + A string defined in IETF RFC 8259. + type: string + + Number: + description: > + A number defined in IETF RFC 8259. + type: number + + UnsignedInt: + description: > + Unsigned integer + type: number + + SubscriptionAuthentication: + description: | + NOTE 1: The clientId and clientPassword passed in a subscription + shall not be the same as the clientId and + clientPassword that are used to obtain authorization for API + requests. Client credentials may differ between + subscriptions. The value of clientPassword should be generated + by a random process. + NOTE 2: As a less secure alternative to OAUTH2_CLIENT_CERT which + uses mutual authentication based on X.509 + certificates, this mode which uses client password to authenticate + may be used in the access token request + toward the authorization server (as defined by IETF RFC 6749 [7]), + only to support legacy implementations + (version 3.4.1 or earlier version of the present document). + See clause 8.1 for more details. + NOTE 3: The following values that were included up to version 3.4.1 + of the present document have been removed: + "BASIC" (to signal the use of the basic HTTP authentication) + has been removed because it is insecure. + "TLS_CERT" to signal an alternative non-token based authorization + method using TLS certificates has been + removed because the method is no longer supported. + NOTE 4: The client certificate is established by means outside the + scope of the present document. + type: object + oneOf: + - required: + - authType + - paramsOauth2ClientCredentials + - required: + - authType + - paramsOauth2ClientCert + properties: + authType: + description: | + Defines the types of Authentication/Authorization which + the API consumer is willing to accept when receiving a + notification. + Permitted values (see note 3): + - OAUTH2_CLIENT_CREDENTIALS: In every + HTTP request to the notification endpoint, use + an OAuth 2.0 token, obtained using the client + credentials grant type after authenticating + using client identifier and client password + towards the token endpoint. + - OAUTH2_CLIENT_CERT: In every HTTP + request to the notification endpoint, use an + OAuth 2.0 token, obtained using the client + credentials grant type after mutually + authenticating using client identifier and X.509 + certificates towards the token endpoint. + type: array + items: + type: string + enum: + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CERT + paramsOauth2ClientCert: + description: > + Parameters for authentication/authorization using + OAUTH2_CLIENT_CERT. + Shall be present if authType is + "OAUTH2_CLIENT_CERT" and the contained + type: object + required: + - clientId + - certificateRef + - tokenEndpoint + properties: + clientId: + description: > + Client identifier to be used in the access token request + of the OAuth 2.0 client credentials grant type. The client + identifier is unique in the scope of the tokenEndpoint. + type: string + certificateRef: + description: > + Fingerprint of the client certificate. The hash function + shall use SHA256 or higher. See note 4. + type: object + required: + - type + - value + properties: + type: + description: > + The type of the fingerprint. + Permitted values: + - x5t#S256: The SHA-256 thumbprint of the + X.509 certificate as defined in section 4.1.8 of + IETF RFC 7515 [23]. + type: string + value: + description: > + The fingerprint value as defined by the type. + type: string + tokenEndpoint: + description: > + The token endpoint from which the access token can be + obtained. + + paramsOauth2ClientCredentials: + description: > + Parameters for authentication/authorization using + OAUTH2_CLIENT_CREDENTIALS. + Shall be present if authType is + "OAUTH2_CLIENT_CREDENTIALS" and the contained + information has not been provisioned out of band. + Shall be absent otherwise. + See note 2. + type: object + properties: + clientId: + description: > + Client identifier to be used in the access token request + of the OAuth 2.0 client credentials grant type. The client + identifier is unique in the scope of the tokenEndpoint. + Shall be present if it has not been provisioned out of + band. See note 1. + type: string + clientPassword: + description: > + Client password to be used in the access token request + of the OAuth 2.0 client credentials grant type. Shall be + present if it has not been provisioned out of band. See + note 1. + type: string + tokenEndpoint: + description: > + The token endpoint from which the access token can be + obtained. Shall be present if it has not been provisioned + out of band. + $ref: "#/definitions/schemas/Uri" + + ProblemDetails: + description: > + The definition of the general "ProblemDetails" data structure from + IETF RFC 7807 [19] is reproduced in this structure. Compared to the + general framework defined in IETF RFC 7807 [19], the "status" and + "detail" attributes are mandated to be included by the present document, + to ensure that the response contains additional textual information about + an error. IETF RFC 7807 [19] foresees extensibility of the + "ProblemDetails" type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to define + additional attributes that provide more information about the error. + The description column only provides some explanation of the meaning to + Facilitate understanding of the design. For a full description, see + IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that identifies the + problem type. It is encouraged that the URI provides human-readable + documentation for the problem (e.g. using HTML) when dereferenced. + When this member is not present, its value is assumed to be + "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It should not + change from occurrence to occurrence of the problem, except for + purposes of localization. If type is given and other than + "about:blank", this attribute shall also be provided. + A short, human-readable summary of the problem + type. It SHOULD NOT change from occurrence to occurrence of the + problem, except for purposes of localization (e.g., using + proactive content negotiation; see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by the origin + server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence of the + problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of the + problem. It may yield further information if dereferenced. + type: string + format: URI diff --git a/src/SOL021/endpoints/.gitkeep b/src/SOL021/endpoints/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/SOL021/endpoints/SOL021_endpoints.yaml b/src/SOL021/endpoints/SOL021_endpoints.yaml new file mode 100644 index 0000000000000000000000000000000000000000..db72f16db8fd73ba11158820430e10d479f251fd --- /dev/null +++ b/src/SOL021/endpoints/SOL021_endpoints.yaml @@ -0,0 +1,87 @@ +# Copyright (c) ETSI 2026. +# https://forge.etsi.org/etsi-forge-copyright-notice.txt +endpoints: + api_versions: + parameters: + - name: Version + description: > + Version of the API requested to use when responding to this request. + in: header + required: false + schema: + type: string + - name: Authorization + description: > + The authorization token for the request. Reference: IETF RFC 7235 + in: header + required: false + schema: + type: string + get: + summary: Retrieve API version information + description: > + The GET method reads API version information. This method shall follow the provisions specified in + table 4.6.3.3.3.2-1 for request and response data structures, and response codes. URI query parameters are not + supported. + responses: + 200: + description: | + 200 OK + + API version information was read successfully. + The response body shall contain 4.4 API version + information, as defined in clause 4.4.1.13. + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ApiVersionInformation + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: The used API version. + schema: + type: string + maximum: 1 + minimum: 1 + 400: + $ref: ../responses/SOL021_resp.yaml#/responses/400 + 401: + $ref: ../responses/SOL021_resp.yaml#/responses/401 + 403: + $ref: ../responses/SOL021_resp.yaml#/responses/403 + 404: + $ref: ../responses/SOL021_resp.yaml#/responses/404 + 405: + $ref: ../responses/SOL021_resp.yaml#/responses/405 + 406: + $ref: ../responses/SOL021_resp.yaml#/responses/406 + 413: + $ref: ../responses/SOL021_resp.yaml#/responses/413 + 414: + $ref: ../responses/SOL021_resp.yaml#/responses/414 + 416: + $ref: ../responses/SOL021_resp.yaml#/responses/416 + 422: + $ref: ../responses/SOL021_resp.yaml#/responses/422 + 429: + $ref: ../responses/SOL021_resp.yaml#/responses/429 + 500: + $ref: ../responses/SOL021_resp.yaml#/responses/500 + 503: + $ref: ../responses/SOL021_resp.yaml#/responses/503 + 504: + $ref: ../responses/SOL021_resp.yaml#/responses/504 \ No newline at end of file diff --git a/src/SOL021/responses/.gitkeep b/src/SOL021/responses/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/SOL021/responses/SOL021_resp.yaml b/src/SOL021/responses/SOL021_resp.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0df9e5c9e013eaec199431a9fa81b19165567275 --- /dev/null +++ b/src/SOL021/responses/SOL021_resp.yaml @@ -0,0 +1,657 @@ +responses: + 206: + description: > + 206 PARTIAL CONTENT + headers: + Content-Type: + description: > + The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + Content-Range: + description: > + The Content-Range response HTTP header indicates where in a full body message a partial message belongs. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 303: + description: > + 303 See Other + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + + 400: + description: | + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the specific cause has to be proper specified in the + "ProblemDetails" structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect + query parameters or the payload body contains a syntactically incorrect data structure), + the API producer shall respond with this response code. The "ProblemDetails" structure shall be provided, + and should include in the "detail" attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource would be so big that the performance + of the API producer is adversely affected, and the API producer does not support paging for the affected resource, + it shall respond with this response code. The "ProblemDetails" structure shall be provided, and should include + in the "detail" attribute more information about the source of the problem. + + If there is an application error related to the client's input that cannot be easily mapped to any other + HTTP response code ("catch all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include in the "detail" attribute more information + about the source of the problem. + + If the request contains a malformed access token, the API producer should respond with this response. + The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 + and IETF RFC 7235. The ProblemDetails structure may be provided. + + The use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 + for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 401: + description: | + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, or if the request contains an authorization + token that is invalid (e.g. expired or revoked), the API producer should respond with this response. + The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 + and IETF RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 403: + description: | + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request to a particular resource, + the API producer shall respond with this response code. The "ProblemDetails" structure shall be provided. + It should include in the "detail" attribute information about the source of the problem, + and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 404: + description: | + 404 NOT FOUND + + If the API producer did not find a current representation for the resource addressed by the URI passed + in the request or is not willing to disclose that one exists, it shall respond with this response code. + The "ProblemDetails" structure may be provided, including in the "detail" attribute information about + the source of the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed by the URI is a container resource + which is designed to contain child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty container resource, a typical response + contains a 200 OK response code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 405: + description: | + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular resource, the API producer shall respond + with this response code. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 406: + description: | + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a content type + that is acceptable to the API producer, the API producer shall respond with this + response code. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 409: + description: > + 409 CONFLICT + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 412: + description: | + 412 PRECONDITION FAILED + + Error: A precondition given in an HTTP request header is not fulfilled. + Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity. + The response body should contain a ProblemDetails structure, in which the "detail" attribute should convey + more information about the error. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 413: + description: | + 413 PAYLOAD TOO LARGE + + If the payload body of a request is larger than the amount of data the API producer is willing or able to process, + it shall respond with this response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for closing the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 414: + description: | + 414 URI TOO LONG + + If the request URI of a request is longer than the API producer is willing or able to process, + it shall respond with this response code. This condition can e.g. be caused by passing long queries + in the request URI of a GET request. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 416: + description: > + 416 Range Not Satisfiable + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 422: + description: | + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data (e.g. well-formed JSON) but the data + cannot be processed (e.g. because it fails validation against a schema), the API producer shall respond + with this response code. The "ProblemDetails" structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 429: + description: | + 429 TOO MANY REQUESTS + + If the API consumer has sent too many requests in a defined period of time and the API producer is able + to detect that condition ("rate limiting"), the API producer shall respond with this response code, + following the provisions in IETF RFC 6585 [17] for the use of the "Retry-After" HTTP header. + The "ProblemDetails" structure shall be provided and shall include in the "detail" attribute more information + about the source of the problem. + + The period of time and allowed number of requests are configured within the API producer by means + outside the scope of the present document. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 500: + description: | + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input that cannot be easily mapped to any other + HTTP response code ("catch all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include in the "detail" attribute more information + about the source of the problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 503: + description: | + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of itself or of a system it relies on, + it should respond with this response code, following the provisions in IETF RFC 7231 for the use of + the "Retry-After" HTTP header and for the alternative to refuse the connection. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails + + 504: + description: | + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a response from an upstream server + (i.e. a server that the API producer communicates with when fulfilling a request), it should respond + with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: > + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + $ref: ../definitions/SOL021_def.yaml#/definitions/schemas/ProblemDetails \ No newline at end of file