X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=r-app-catalogue%2Fapi%2Frac-api.yaml;h=748cf2b428dde447825a213961116ff0000c306c;hb=8cffee5976e66653c08f55abfe59663ecfd44f66;hp=87e2eb97c4273226b7977e2dbd8f67fa1a7ed70f;hpb=0b0cb1fdcf166e438c6932f1eb0f29dafafbe635;p=nonrtric.git diff --git a/r-app-catalogue/api/rac-api.yaml b/r-app-catalogue/api/rac-api.yaml index 87e2eb97..748cf2b4 100644 --- a/r-app-catalogue/api/rac-api.yaml +++ b/r-app-catalogue/api/rac-api.yaml @@ -11,33 +11,24 @@ paths: get: tags: - rAPP Catalogue API - summary: Service names - operationId: getServiceNamesUsingGET + summary: Services + operationId: getServices responses: 200: - description: Service names + description: Services content: application/json: schema: type: array items: - type: string - example: - - DroneIdentifier - - Collector - 401: - description: Unauthorized - 403: - description: Forbidden - 404: - description: Not used + $ref: '#/components/schemas/service' deprecated: false /services/{serviceName}: get: tags: - rAPP Catalogue API summary: Individual Service - operationId: getIndividualServiceUsingGET + operationId: getIndividualService parameters: - name: serviceName in: path @@ -50,15 +41,11 @@ paths: example: DroneIdentifier responses: 200: - description: EI Job + description: Service content: application/json: schema: $ref: '#/components/schemas/service' - 401: - description: Unauthorized - 403: - description: Forbidden 404: description: Service is not found content: @@ -70,7 +57,7 @@ paths: tags: - rAPP Catalogue API summary: Create or update a Service - operationId: putIndividualServiceUsingPUT + operationId: putIndividualService parameters: - name: serviceName in: path @@ -85,32 +72,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/service' + $ref: '#/components/schemas/inputService' required: true responses: 200: description: Service updated 201: description: Service created - 401: - description: Unauthorized - 403: - description: Forbidden - 404: + headers: + Location: + description: URL to the created Service + style: simple + explode: false + schema: + type: string + 400: description: Provided service is not correct content: application/json: schema: $ref: '#/components/schemas/error_information' example: - detail: Service is missing required property version - status: 404 + detail: 'Service is missing required property: version' + status: 400 deprecated: false delete: tags: - rAPP Catalogue API summary: Remove a Service from the catalogue - operationId: deleteIndividualServiceUsingDELETE + operationId: deleteIndividualService parameters: - name: serviceName in: path @@ -121,29 +111,42 @@ paths: type: string example: DroneIdentifier responses: - 200: - description: Not used 204: - description: Job deleted - 401: - description: Unauthorized - 403: - description: Forbidden - 404: - description: Service is not found - content: - application/json: - schema: - $ref: '#/components/schemas/error_information' + description: Service deleted deprecated: false components: schemas: + inputService: + title: inputService + required: + - version + type: object + properties: + version: + type: string + description: Version of the Service + example: 1.0.0 + display_name: + type: string + description: Display name for the Service + example: Drone Identifier + description: + type: string + description: Description of the Service + example: Detects if a UE is a drone + description: A Service to register service: title: service required: + - name + - registrationDate - version type: object properties: + name: + type: string + description: Unique identifier of the Service + example: DroneIdentifier version: type: string description: Version of the Service @@ -156,6 +159,10 @@ components: type: string description: Description of the Service example: Detects if a UE is a drone + registrationDate: + type: string + description: Date when the Service was registered in the catalogue + example: 2020-11-03 description: A Service error_information: title: error_information @@ -168,8 +175,7 @@ components: example: Service not found status: type: integer - description: The HTTP status code generated by the origin server for this - occurrence of the problem. + description: The HTTP status code for this occurrence of the problem. format: int32 example: 404 description: Problem as defined in https://tools.ietf.org/html/rfc7807