From 10c7bec987b54b83ee7fad09c3b1ca0167582e19 Mon Sep 17 00:00:00 2001 From: Laurent Velez <laurent.velez@etsi.org> Date: Wed, 28 Jul 2021 18:35:05 +0200 Subject: [PATCH] test --- OpenAPI/openapi-AE6.yaml | 173 +------------------ OpenAPI/openapi-AE7.yaml | 355 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 361 insertions(+), 167 deletions(-) create mode 100644 OpenAPI/openapi-AE7.yaml diff --git a/OpenAPI/openapi-AE6.yaml b/OpenAPI/openapi-AE6.yaml index 927352d..7e53753 100644 --- a/OpenAPI/openapi-AE6.yaml +++ b/OpenAPI/openapi-AE6.yaml @@ -2,7 +2,7 @@ openapi: 3.0.1 info: title: AE description: API for AE resource management - version: '0.1' + version: '1.0' servers: - url: 'http://cse-address:8080' paths: @@ -76,7 +76,7 @@ paths: examples: '0': - $ref: "#/components/responses/response201" + $ref: "#/components/responses/response202" value: >- {"m2m:rce": {"ae": {"rn": "temperature", "api": "N01.com.company.temperature ", "lbl": ["key1", "key2"], @@ -392,65 +392,14 @@ components: - response201: - description: >- - Bad Request. - - content: - application/problem+json: - schema: - type: object - properties: - 'm2m:rce': - type: object - properties: - ae: - type: object - properties: - rr: - type: boolean - poa: - type: array - items: - type: string - aei: - type: string - ty: - type: integer - lt: - type: string - et: - type: string - ct: - type: string - srv: - type: array - items: - type: string - lbl: - type: array - items: - type: string - ri: - type: string - pi: - type: string - api: - type: string - rn: - type: string - uri: - type: string - + response202: description: >- Bad Request. - Incorrect parameters were passed in the request.In the returned - ProblemDetails structure, the "detail" attribute should convey more - information about the error. + content: - application/problem+json: + application/json: schema: type: object properties: @@ -496,114 +445,4 @@ components: type: string - Error.403: - description: - Forbidden. - The operation is not allowed given the current status of the - resource. More information should be provided in the "detail" - attribute of the "ProblemDetails" structure. - content: - application/problem+json: - schema: - $ref: "#/components/schemas/ProblemDetails" - Error.404: - description: >- - Not Found. - The client provided a URI that cannot be mapped to a valid resource - URL. In the returned ProblemDetails structure, the "detail" - attribute should convey more information about the error. - content: - application/problem+json: - schema: - $ref: "#/components/schemas/ProblemDetails" - text/plain: - schema: - $ref: '#/components/schemas/Empty' - Error.412: - description: >- - Precondition Failed. - It is used when a condition has failed during conditional requests, - e.g. when using ETags to avoid write conflicts.In the returned - ProblemDetails structure, the "detail" attribute should convey more - information about the error. - content: - application/problem+json: - schema: - $ref: "#/components/schemas/ProblemDetails" - text/plain: - schema: - $ref: '#/components/schemas/Empty' - securitySchemes: - OauthSecurity: - type: oauth2 - flows: - clientCredentials: - tokenUrl: https://oauth.exampleAPI/token - scopes: - all: Single oauth2 scope for API - schemas: - Empty: - description: Empty schema - ProblemDetails: - type: object - properties: - type: - $ref: "#/components/schemas/Problem.type" - title: - $ref: "#/components/schemas/Problem.title" - status: - $ref: "#/components/schemas/Problem.status" - detail: - $ref: "#/components/schemas/Problem.detail" - instance: - $ref: "#/components/schemas/Problem.instance" - Problem.type: - type: string - format: uri - description: A URI reference according to IETF RFC 3986 that identifies the problem - type - Problem.title: - type: string - description: A short, human-readable summary of the problem type - Problem.status: - type: integer - format: uint32 - description: The HTTP status code for this occurrence of the problem - Problem.detail: - type: string - description: A human-readable explanation specific to this occurrence of the problem - Problem.instance: - type: string - format: uri - description: A URI reference that identifies the specific occurrence of the problem - UeIdentityTagInfo: - description: information of UE identity tag used in UE Identity feature - type: object - required: - - ueIdentityTags - properties: - ueIdentityTags: - $ref: "#/components/schemas/UeIdentityTags" - UeIdentityTags: - description: 1 to N tags presented by a ME Application instance to a ME Platform - type: array - items: - required: - - ueIdentityTag - - state - properties: - ueIdentityTag: - $ref: "#/components/schemas/UeIdentityTag" - state: - $ref: "#/components/schemas/State" - UeIdentityTag: - description: Specific tag presented by a ME Application instance to a ME Platform - type: string - example: UeTagA - State: - description: Status of the resource ueIdentityTagInfo - type: string - enum: - - UNREGISTERED - - REGISTERED - example: REGISTERED + \ No newline at end of file diff --git a/OpenAPI/openapi-AE7.yaml b/OpenAPI/openapi-AE7.yaml new file mode 100644 index 0000000..e49c516 --- /dev/null +++ b/OpenAPI/openapi-AE7.yaml @@ -0,0 +1,355 @@ +openapi: 3.0.1 +info: + title: AE + description: API for AE resource management + version: '1.0' +servers: + - url: 'http://cse-address:8080' +paths: + /csename: + post: + description: Create AE Resource + parameters: + - name: X-M2M-Origin + in: header + required: true + style: simple + explode: false + schema: + type: string + example: CAdmin + - name: X-M2M-RVI + in: header + required: false + style: simple + explode: false + schema: + type: string + example: '3' + - name: X-M2M-RI + in: header + required: false + style: simple + explode: false + schema: + type: string + example: '1234' + requestBody: + content: + application/json;ty=2: + schema: + type: object + examples: + '0': + value: |- + { + "m2m:ae" : { + "rn": "aename", + "api": "N01.com.company.aename ", + "lbl": ["key1", "key2"], + "rr": true, + "srv": ["3"], + "poa": ["http://cse-address:8080"] + } + } + responses: + + '202': + description: Auto generated using Swagger Inspector + content: + application/json: + examples: + '0': + value: >- + {"m2m:rce": {"ae": {"rn": "temperature", "api": + "N01.com.company.temperature ", "lbl": ["key1", "key2"], + "rr": true, "srv": ["3"], "poa": + ["http://192.168.1.30:8080"], "ri": "Ctemperature", "ct": + "20210728T095441,065102", "lt": "20210728T095441,065102", + "et": "20220728T095441,065102", "pi": "id-in", "ty": 2, + "aei": "Ctemperature"}, "uri": "cse-in/temperature"}} + + + '200': + description: Auto generated using Swagger Inspector + content: + application/json: + + examples: + '0': + + value: >- + {"m2m:rce": {"ae": {"rn": "temperature", "api": + "N01.com.company.temperature ", "lbl": ["key1", "key2"], + "rr": true, "srv": ["3"], "poa": + ["http://192.168.1.30:8080"], "ri": "Ctemperature", "ct": + "20210728T095441,065102", "lt": "20210728T095441,065102", + "et": "20220728T095441,065102", "pi": "id-in", "ty": 2, + "aei": "Ctemperature"}, "uri": "cse-in/temperature"}} + + '204': + description: Auto generated using Swagger Inspector + content: + application/json: + + + + examples: + with no rcn or rcn=1 in the request: + value: >- + {"m2m:ae": {"rn": "temperature", "api": + "N01.com.company.temperature ", "lbl": ["key1", "key2"], + "rr": true, "srv": ["3"], "poa": + ["http://192.168.1.30:8080"], "ri": "CAdmin", "ct": + "20210330T153934,791690", "lt": "20210330T153934,791690", + "et": "20220330T153934,791714", "pi": "id-in", "ty": 2, + "aei": "CAdmin"}} + with rcn=0 in the request: + value: >- + {} + with rcn=2 in the request: + value: >- + {"m2m:ae": "csename/aename"} + with rcn=3 in the request: + value: >- + {"m2m:rce" {"m2m:ae": {"rn": "aename", "api": "N01.com.company.aename ", + "lbl": ["key1", "key2"], "rr": true, "srv": ["3"], "poa": ["http://cse-address:8080"], + "ri": "CAdmin", "ct": "20210330T153934,791690", "lt": "20210330T153934,791690", "et": "20220330T153934,791714", "pi": "cse-id", "ty": 2, + "aei": "CAdmin"} "uri": "mn-name/ae_sensor"}} + + servers: + - url: 'http://cse-address:8080' + servers: + - url: 'http://cse-address:8080' + /csename/aename: + get: + description: Retrieve AE Resource + parameters: + - name: X-M2M-Origin + in: header + required: true + style: simple + explode: false + schema: + type: string + example: CAdmin + - name: X-M2M-RVI + in: header + required: false + style: simple + explode: false + schema: + type: string + example: '3' + - name: X-M2M-RI + in: header + required: false + style: simple + explode: false + schema: + type: string + example: '1234' + responses: + '200': + description: Retrieve AE Response + content: + application/json: + examples: + with no rcn or rcn=1 in the request: + value: |- + { + "m2m:ae": { + "rn": "aename", + "api": "N01.com.company.aename ", + "lbl": ["key1", "key2"], + "rr": true, + "srv": ["3"], + "poa": ["http://cse-address:8080"], + "ri": "CAdmin", + "ct": "20210330T153934,791690", + "lt": "20210330T153934,791690", + "et": "20220330T153934,791714", + "pi": "cse-id", + "ty": 2, + "aei": "CAdmin" + } + } + with rcn=4 in the request: + value: |- + { + "m2m:ae": { + "rn": "aename", + "api": "N01.com.company.aename ", + "lbl": ["key1", "key2"], + "rr": true, + "srv": ["3"], + "poa": ["http://cse-address:8080"], + "ri": "CAdmin", + "ct": "20210406T171115,934044", + "lt": "20210406T171115,934044", + "et": "20220406T171115,934064", + "pi": "cse-id", + "ty": 2, + "aei": "CAdmin", + "m2m:cnt": + [{"rn": "data1", + "lbl": ["API"], + "ri": "cnt7407517254520235341", + "ct": "20210407T073116,754629", + "lt": "20210407T073116,754629", + "et": "20220407T073116,754662", + "pi": "CAdmin", + "st": 0, + "ty": 3, + "cni": 0, + "cbs": 0 + }, + { + "rn": "data2", + "lbl": ["API2"], + "ri": "cnt446121489468649928", + "ct": "20210407T073158,811116", + "lt": "20210407T073158,811116", + "et": "20220407T073158,811187", + "pi": "CAdmin", + "st": 0, + "ty": 3, + "cni": 0, + "cbs": 0 + }] + } + } + servers: + - url: 'http://cse-address:8080' + put: + description: Update AE resource + parameters: + - name: X-M2M-Origin + in: header + required: false + style: simple + explode: false + schema: + type: string + example: CAdmin + - name: X-M2M-RVI + in: header + required: false + style: simple + explode: false + schema: + type: string + example: '3' + - name: X-M2M-RI + in: header + required: false + style: simple + explode: false + schema: + type: string + example: '1234' + requestBody: + content: + application/json: + schema: + type: string + examples: + '0': + value: |- + { + "m2m:ae" : { + "lbl": ["aename bedroom"], + "poa": ["http://192.168.1.50:9090"] + } + } + responses: + '200': + description: Update AE Response + content: + application/json: + examples: + with no rcn or rcn=1 in the request: + value: |- + { + "m2m:ae": { + "rn": "aename", + "api": "N01.com.company.aename ", + "lbl": ["aename bedroom"], + "rr": true, + "srv": ["3"], + "poa": ["http://192.168.1.50:9090"], + "ri": "CAdmin", + "ct": "20210406T171115,934044", + "lt": "20210407T080109,896281", + "et": "20220406T171115,934064", + "pi": "cse-id", + "ty": 2, + "aei": "CAdmin" + } + } + with rcn=0 in the request: + value: '' + servers: + - url: 'http://cse-address:8080' + delete: + description: Delete AE + parameters: + - name: X-M2M-Origin + in: header + required: false + style: simple + explode: false + schema: + type: string + example: CAdmin + - name: X-M2M-RVI + in: header + required: false + style: simple + explode: false + schema: + type: string + example: '3' + - name: X-M2M-RI + in: header + required: false + style: simple + explode: false + schema: + type: string + example: '1234' + responses: + '200': + description: Delete AE response + content: + application/json: + examples: + with no rcn or rcn=0 in the request: + value: '' + with rcn=1 in the request: + value: |- + { + "m2m:ae": { + "rn": "aename", + "api": "N01.com.company.aename ", + "lbl": ["key1", "key2"], + "rr": true, + "srv": ["3"], + "poa": ["http://cse-address:8080"], + "ri": "C8r12WReyGd", + "ct": "20210407T090236,657104", + "lt": "20210407T090236,657104", + "et": "20220407T090236,657145", + "pi": "cse-id", + "ty": 2, + "aei": "C8r12WReyGd" + } + } + servers: + - url: 'http://cse-address:8080' + servers: + - url: 'http://cse-address:8080' + + + + -- GitLab