Add generation of API yaml file
Change-Id: I893e4ecb0c89b92d5c5cdecd2dc72a603d5340bb
Issue-ID: NONRTRIC-354
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
diff --git a/enrichment-coordinator-service/api/ecs-api.json b/enrichment-coordinator-service/api/ecs-api.json
new file mode 100644
index 0000000..a27be46
--- /dev/null
+++ b/enrichment-coordinator-service/api/ecs-api.json
@@ -0,0 +1,745 @@
+{
+ "basePath": "/",
+ "paths": {
+ "/producer_simulator/ei_job": {"post": {
+ "summary": "Callback for EI job creation",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "jobCreatedCallbackUsingPOST",
+ "responses": {
+ "200": {"description": "OK"},
+ "201": {"description": "Created"},
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "parameters": [{
+ "schema": {"$ref": "#/definitions/producer_ei_job_request"},
+ "in": "body",
+ "name": "request",
+ "description": "request",
+ "required": true
+ }],
+ "tags": ["Producer Callbacks"],
+ "consumes": ["application/json"]
+ }},
+ "/A1-EI/v1/eitypes/{eiTypeId}": {"get": {
+ "summary": "Individual EI type",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiTypeUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/EiTypeObject"},
+ "description": "EI type"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information type is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiTypeId",
+ "description": "eiTypeId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["A1-EI (enrichment information)"]
+ }},
+ "/consumer_simulator/eijobs/{eiJobId}/status": {"post": {
+ "summary": "Callback for EI job status",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "jobStatusCallbackUsingPOST",
+ "responses": {
+ "200": {"description": "OK"},
+ "201": {"description": "Created"},
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "parameters": [
+ {
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ },
+ {
+ "schema": {"$ref": "#/definitions/EiJobStatusObject"},
+ "in": "body",
+ "name": "status",
+ "description": "status",
+ "required": true
+ }
+ ],
+ "tags": ["Consumer Callbacks"],
+ "consumes": ["application/json"]
+ }},
+ "/ei-producer/v1/eitypes": {"get": {
+ "summary": "EI type identifiers",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiTypeIdentifiersUsingGET_1",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "description": "EI type identifiers"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/A1-EI/v1/eitypes": {"get": {
+ "summary": "EI type identifiers",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiTypeIdentifiersUsingGET",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "description": "EI type identifiers"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["A1-EI (enrichment information)"]
+ }},
+ "/ei-producer/v1/eiproducers/{eiProducerId}/status": {"get": {
+ "summary": "EI producer status",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiProducerStatusUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/producer_status"},
+ "description": "EI jobs"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information producer is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/producer_simulator/ei_job/{eiJobId}": {"delete": {
+ "summary": "Callback for EI job deletion",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "jobDeletedCallbackUsingDELETE",
+ "responses": {
+ "200": {"description": "OK"},
+ "401": {"description": "Unauthorized"},
+ "204": {"description": "No Content"},
+ "403": {"description": "Forbidden"}
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Producer Callbacks"]
+ }},
+ "/ei-producer/v1/eiproducers": {"get": {
+ "summary": "EI producer identifiers",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiProducerIdentifiersUsingGET",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "description": "EI producer identifiers"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/ei-producer/v1/eitypes/{eiTypeId}": {"get": {
+ "summary": "Individual EI type",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiTypeUsingGET_1",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/producer_ei_type_info"},
+ "description": "EI type"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information type is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiTypeId",
+ "description": "eiTypeId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/status": {"get": {
+ "summary": "Returns status and statistics of this service",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getStatusUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/status_info"},
+ "description": "Service is living"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["Service status"]
+ }},
+ "/A1-EI/v1/eijobs/{eiJobId}": {
+ "get": {
+ "summary": "Individual EI job",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getIndividualEiJobUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/EiJobObject"},
+ "description": "EI job"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information job is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["A1-EI (enrichment information)"]
+ },
+ "delete": {
+ "summary": "Individual EI job",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "deleteIndividualEiJobUsingDELETE",
+ "responses": {
+ "200": {"description": "Not used"},
+ "401": {"description": "Unauthorized"},
+ "204": {"description": "Job deleted"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information job is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["A1-EI (enrichment information)"]
+ },
+ "put": {
+ "summary": "Individual EI job",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "putIndividualEiJobUsingPUT",
+ "responses": {
+ "200": {"description": "Job updated"},
+ "201": {"description": "Job created"},
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information type is not found"
+ }
+ },
+ "parameters": [
+ {
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ },
+ {
+ "schema": {"$ref": "#/definitions/EiJobObject"},
+ "in": "body",
+ "name": "eiJobObject",
+ "description": "eiJobObject",
+ "required": true
+ }
+ ],
+ "tags": ["A1-EI (enrichment information)"],
+ "consumes": ["application/json"]
+ }
+ },
+ "/ei-producer/v1/eiproducers/{eiProducerId}": {
+ "get": {
+ "summary": "Individual EI producer",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiProducerUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/producer_registration_info"},
+ "description": "EI jobs"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information producer is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ },
+ "delete": {
+ "summary": "Individual EI producer",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "deleteEiProducerUsingDELETE",
+ "responses": {
+ "200": {"description": "Not used"},
+ "401": {"description": "Unauthorized"},
+ "204": {"description": "Producer deleted"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Producer is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ },
+ "put": {
+ "summary": "Individual EI producer",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "putEiProducerUsingPUT",
+ "responses": {
+ "200": {"description": "Producer updated"},
+ "201": {"description": "Producer created"},
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "parameters": [
+ {
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ },
+ {
+ "schema": {"$ref": "#/definitions/producer_registration_info"},
+ "in": "body",
+ "name": "registrationInfo",
+ "description": "registrationInfo",
+ "required": true
+ }
+ ],
+ "tags": ["Enrichment Data Producer API"],
+ "consumes": ["application/json"]
+ }
+ },
+ "/producer_simulator/health_check": {"get": {
+ "summary": "Producer supervision",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "producerSupervisionUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"type": "string"},
+ "description": "OK"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["Producer Callbacks"]
+ }},
+ "/ei-producer/v1/eiproducers/{eiProducerId}/eijobs": {"get": {
+ "summary": "EI job definitions",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "description": "EI job definitions for one EI producer",
+ "operationId": "getEiProducerJobsUsingGET",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"$ref": "#/definitions/producer_ei_job_request"}
+ },
+ "description": "EI jobs"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information producer is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/A1-EI/v1/eijobs": {"get": {
+ "summary": "EI job identifiers",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "description": "query for EI job identifiers",
+ "operationId": "getEiJobIdsUsingGET",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "description": "EI job identifiers"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information type is not found"
+ }
+ },
+ "parameters": [
+ {
+ "in": "query",
+ "allowEmptyValue": false,
+ "name": "eiTypeId",
+ "description": "selects EI jobs of matching EI type",
+ "type": "string",
+ "required": false
+ },
+ {
+ "in": "query",
+ "allowEmptyValue": false,
+ "name": "owner",
+ "description": "selects EI jobs for one EI job owner",
+ "type": "string",
+ "required": false
+ }
+ ],
+ "tags": ["A1-EI (enrichment information)"]
+ }},
+ "/A1-EI/v1/eijobs/{eiJobId}/status": {"get": {
+ "summary": "EI job status",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiJobStatusUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/EiJobStatusObject"},
+ "description": "EI job status"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information job is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["A1-EI (enrichment information)"]
+ }}
+ },
+ "host": "localhost:38585",
+ "definitions": {
+ "producer_ei_job_request": {
+ "description": "The body of the EI producer callbacks for EI job creation and deletion",
+ "type": "object",
+ "title": "producer_ei_job_request",
+ "required": ["ei_job_identity"],
+ "properties": {
+ "owner": {
+ "description": "The owner of the job",
+ "type": "string"
+ },
+ "ei_job_identity": {
+ "description": "Idenitity of the EI job",
+ "type": "string"
+ },
+ "ei_job_data": {
+ "description": "Json for the job data",
+ "type": "object"
+ },
+ "target_uri": {
+ "description": "URI for the target of the EI",
+ "type": "string"
+ },
+ "ei_type_identity": {
+ "description": "Type idenitity for the job",
+ "type": "string"
+ }
+ }
+ },
+ "EiTypeObject": {
+ "description": "Information for an EI type",
+ "type": "object",
+ "title": "EiTypeObject"
+ },
+ "producer_ei_type_registration_info": {
+ "description": "Information for an EI type",
+ "type": "object",
+ "title": "producer_ei_type_registration_info",
+ "required": ["ei_type_identity"],
+ "properties": {
+ "ei_type_identity": {
+ "description": "EI type identity",
+ "type": "string"
+ },
+ "ei_job_data_schema": {
+ "description": "Json schema for the job data",
+ "type": "object"
+ }
+ }
+ },
+ "status_info": {
+ "type": "object",
+ "title": "status_info",
+ "properties": {
+ "no_of_producers": {
+ "format": "int32",
+ "description": "Number of EI producers",
+ "type": "integer"
+ },
+ "no_of_jobs": {
+ "format": "int32",
+ "description": "Number of EI jobs",
+ "type": "integer"
+ },
+ "no_of_types": {
+ "format": "int32",
+ "description": "Number of EI types",
+ "type": "integer"
+ },
+ "status": {
+ "description": "status text",
+ "type": "string"
+ }
+ }
+ },
+ "Mono«ResponseEntity«object»»": {
+ "type": "object",
+ "title": "Mono«ResponseEntity«object»»"
+ },
+ "producer_ei_type_info": {
+ "description": "Information for an EI type",
+ "type": "object",
+ "title": "producer_ei_type_info",
+ "properties": {
+ "ei_producer_ids": {
+ "description": "Registered producers",
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "ei_job_data_schema": {
+ "description": "Json schema for the job data",
+ "type": "object"
+ }
+ }
+ },
+ "producer_registration_info": {
+ "description": "Information for an EI producer",
+ "type": "object",
+ "title": "producer_registration_info",
+ "required": [
+ "ei_job_callback_url",
+ "ei_producer_supervision_callback_url",
+ "supported_ei_types"
+ ],
+ "properties": {
+ "supported_ei_types": {
+ "description": "Supported EI types",
+ "type": "array",
+ "items": {"$ref": "#/definitions/producer_ei_type_registration_info"}
+ },
+ "ei_producer_supervision_callback_url": {
+ "description": "callback for producer supervision",
+ "type": "string"
+ },
+ "ei_job_callback_url": {
+ "description": "callback for EI job",
+ "type": "string"
+ }
+ }
+ },
+ "producer_status": {
+ "description": "Status for an EI Producer",
+ "type": "object",
+ "title": "producer_status",
+ "required": ["operational_state"],
+ "properties": {"operational_state": {
+ "description": "Operational state, values:\nENABLED: TBD\nDISABLED: TBD.",
+ "type": "string",
+ "enum": [
+ "ENABLED",
+ "DISABLED"
+ ]
+ }}
+ },
+ "ProblemDetails": {
+ "description": "A problem detail to carry details in a HTTP response according to RFC 7807",
+ "type": "object",
+ "title": "ProblemDetails",
+ "properties": {
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.",
+ "type": "string",
+ "example": "EI job type not found"
+ },
+ "status": {
+ "format": "int32",
+ "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
+ "type": "integer",
+ "example": 404
+ }
+ }
+ },
+ "Void": {
+ "description": "Void/empty",
+ "type": "object",
+ "title": "Void"
+ },
+ "EiJobStatusObject": {
+ "description": "Status for an EI job",
+ "type": "object",
+ "title": "EiJobStatusObject",
+ "required": ["eiJobStatus"],
+ "properties": {"eiJobStatus": {
+ "description": "values:\nENABLED: the A1-EI producer is able to deliver EI result for the EI job\nDISABLED: the A1-EI producer is unable to deliver EI result for the EI job",
+ "type": "string",
+ "enum": [
+ "ENABLED",
+ "DISABLED"
+ ]
+ }}
+ },
+ "EiJobObject": {
+ "description": "Information for an Enrichment Information Job",
+ "type": "object",
+ "title": "EiJobObject",
+ "required": [
+ "eiTypeId",
+ "jobDefinition",
+ "jobOwner",
+ "jobResultUri"
+ ],
+ "properties": {
+ "eiTypeId": {
+ "description": "EI type Idenitifier of the EI job",
+ "type": "string"
+ },
+ "jobResultUri": {
+ "description": "The target URI of the EI data",
+ "type": "string"
+ },
+ "jobOwner": {
+ "description": "Identity of the owner of the job",
+ "type": "string"
+ },
+ "jobStatusNotificationUri": {
+ "description": "The target of EI job status notifications",
+ "type": "string"
+ },
+ "jobDefinition": {
+ "description": "EI type specific job data",
+ "type": "object"
+ }
+ }
+ }
+ },
+ "swagger": "2.0",
+ "info": {
+ "description": "This page lists all the rest apis for the service.",
+ "title": "Enrichment Data service",
+ "version": "1.0"
+ },
+ "tags": [
+ {
+ "name": "A1-EI (enrichment information)",
+ "description": "Consumer Controller"
+ },
+ {
+ "name": "Consumer Callbacks",
+ "description": "Consumer Simulator Controller"
+ },
+ {
+ "name": "Enrichment Data Producer API",
+ "description": "Producer Controller"
+ },
+ {
+ "name": "Producer Callbacks",
+ "description": "Producer Simulator Controller"
+ },
+ {
+ "name": "Service status",
+ "description": "Status Controller"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/enrichment-coordinator-service/api/ecs-api.yaml b/enrichment-coordinator-service/api/ecs-api.yaml
new file mode 100644
index 0000000..e317541
--- /dev/null
+++ b/enrichment-coordinator-service/api/ecs-api.yaml
@@ -0,0 +1,827 @@
+openapi: 3.0.1
+info:
+ title: Enrichment Data service
+ description: This page lists all the rest apis for the service.
+ version: "1.0"
+servers:
+- url: //localhost:38585/
+tags:
+- name: A1-EI (enrichment information)
+ description: Consumer Controller
+- name: Consumer Callbacks
+ description: Consumer Simulator Controller
+- name: Enrichment Data Producer API
+ description: Producer Controller
+- name: Producer Callbacks
+ description: Producer Simulator Controller
+- name: Service status
+ description: Status Controller
+paths:
+ /producer_simulator/ei_job:
+ post:
+ tags:
+ - Producer Callbacks
+ summary: Callback for EI job creation
+ operationId: jobCreatedCallbackUsingPOST
+ requestBody:
+ description: request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/producer_ei_job_request'
+ required: true
+ responses:
+ 200:
+ description: OK
+ content: {}
+ 201:
+ description: Created
+ content: {}
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Not Found
+ content: {}
+ deprecated: false
+ /A1-EI/v1/eitypes/{eiTypeId}:
+ get:
+ tags:
+ - A1-EI (enrichment information)
+ summary: Individual EI type
+ operationId: getEiTypeUsingGET
+ parameters:
+ - name: eiTypeId
+ in: path
+ description: eiTypeId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: EI type
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EiTypeObject'
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information type is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ /consumer_simulator/eijobs/{eiJobId}/status:
+ post:
+ tags:
+ - Consumer Callbacks
+ summary: Callback for EI job status
+ operationId: jobStatusCallbackUsingPOST
+ parameters:
+ - name: eiJobId
+ in: path
+ description: eiJobId
+ required: true
+ schema:
+ type: string
+ requestBody:
+ description: status
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EiJobStatusObject'
+ required: true
+ responses:
+ 200:
+ description: OK
+ content: {}
+ 201:
+ description: Created
+ content: {}
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Not Found
+ content: {}
+ deprecated: false
+ /ei-producer/v1/eitypes:
+ get:
+ tags:
+ - Enrichment Data Producer API
+ summary: EI type identifiers
+ operationId: getEiTypeIdentifiersUsingGET_1
+ responses:
+ 200:
+ description: EI type identifiers
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: string
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Not Found
+ content: {}
+ deprecated: false
+ /A1-EI/v1/eitypes:
+ get:
+ tags:
+ - A1-EI (enrichment information)
+ summary: EI type identifiers
+ operationId: getEiTypeIdentifiersUsingGET
+ responses:
+ 200:
+ description: EI type identifiers
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: string
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Not Found
+ content: {}
+ deprecated: false
+ /ei-producer/v1/eiproducers/{eiProducerId}/status:
+ get:
+ tags:
+ - Enrichment Data Producer API
+ summary: EI producer status
+ operationId: getEiProducerStatusUsingGET
+ parameters:
+ - name: eiProducerId
+ in: path
+ description: eiProducerId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: EI jobs
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/producer_status'
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information producer is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ /producer_simulator/ei_job/{eiJobId}:
+ delete:
+ tags:
+ - Producer Callbacks
+ summary: Callback for EI job deletion
+ operationId: jobDeletedCallbackUsingDELETE
+ parameters:
+ - name: eiJobId
+ in: path
+ description: eiJobId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: OK
+ content: {}
+ 204:
+ description: No Content
+ content: {}
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ deprecated: false
+ /ei-producer/v1/eiproducers:
+ get:
+ tags:
+ - Enrichment Data Producer API
+ summary: EI producer identifiers
+ operationId: getEiProducerIdentifiersUsingGET
+ responses:
+ 200:
+ description: EI producer identifiers
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: string
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Not Found
+ content: {}
+ deprecated: false
+ /ei-producer/v1/eitypes/{eiTypeId}:
+ get:
+ tags:
+ - Enrichment Data Producer API
+ summary: Individual EI type
+ operationId: getEiTypeUsingGET_1
+ parameters:
+ - name: eiTypeId
+ in: path
+ description: eiTypeId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: EI type
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/producer_ei_type_info'
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information type is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ /status:
+ get:
+ tags:
+ - Service status
+ summary: Returns status and statistics of this service
+ operationId: getStatusUsingGET
+ responses:
+ 200:
+ description: Service is living
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/status_info'
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Not Found
+ content: {}
+ deprecated: false
+ /A1-EI/v1/eijobs/{eiJobId}:
+ get:
+ tags:
+ - A1-EI (enrichment information)
+ summary: Individual EI job
+ operationId: getIndividualEiJobUsingGET
+ parameters:
+ - name: eiJobId
+ in: path
+ description: eiJobId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: EI job
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EiJobObject'
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information job is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ put:
+ tags:
+ - A1-EI (enrichment information)
+ summary: Individual EI job
+ operationId: putIndividualEiJobUsingPUT
+ parameters:
+ - name: eiJobId
+ in: path
+ description: eiJobId
+ required: true
+ schema:
+ type: string
+ requestBody:
+ description: eiJobObject
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EiJobObject'
+ required: true
+ responses:
+ 200:
+ description: Job updated
+ content: {}
+ 201:
+ description: Job created
+ content: {}
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information type is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ delete:
+ tags:
+ - A1-EI (enrichment information)
+ summary: Individual EI job
+ operationId: deleteIndividualEiJobUsingDELETE
+ parameters:
+ - name: eiJobId
+ in: path
+ description: eiJobId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: Not used
+ content: {}
+ 204:
+ description: Job deleted
+ content: {}
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information job is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ /ei-producer/v1/eiproducers/{eiProducerId}:
+ get:
+ tags:
+ - Enrichment Data Producer API
+ summary: Individual EI producer
+ operationId: getEiProducerUsingGET
+ parameters:
+ - name: eiProducerId
+ in: path
+ description: eiProducerId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: EI jobs
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/producer_registration_info'
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information producer is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ put:
+ tags:
+ - Enrichment Data Producer API
+ summary: Individual EI producer
+ operationId: putEiProducerUsingPUT
+ parameters:
+ - name: eiProducerId
+ in: path
+ description: eiProducerId
+ required: true
+ schema:
+ type: string
+ requestBody:
+ description: registrationInfo
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/producer_registration_info'
+ required: true
+ responses:
+ 200:
+ description: Producer updated
+ content: {}
+ 201:
+ description: Producer created
+ content: {}
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Not Found
+ content: {}
+ deprecated: false
+ delete:
+ tags:
+ - Enrichment Data Producer API
+ summary: Individual EI producer
+ operationId: deleteEiProducerUsingDELETE
+ parameters:
+ - name: eiProducerId
+ in: path
+ description: eiProducerId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: Not used
+ content: {}
+ 204:
+ description: Producer deleted
+ content: {}
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Producer is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ /producer_simulator/health_check:
+ get:
+ tags:
+ - Producer Callbacks
+ summary: Producer supervision
+ operationId: producerSupervisionUsingGET
+ responses:
+ 200:
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: string
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Not Found
+ content: {}
+ deprecated: false
+ /ei-producer/v1/eiproducers/{eiProducerId}/eijobs:
+ get:
+ tags:
+ - Enrichment Data Producer API
+ summary: EI job definitions
+ description: EI job definitions for one EI producer
+ operationId: getEiProducerJobsUsingGET
+ parameters:
+ - name: eiProducerId
+ in: path
+ description: eiProducerId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: EI jobs
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/producer_ei_job_request'
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information producer is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ /A1-EI/v1/eijobs:
+ get:
+ tags:
+ - A1-EI (enrichment information)
+ summary: EI job identifiers
+ description: query for EI job identifiers
+ operationId: getEiJobIdsUsingGET
+ parameters:
+ - name: eiTypeId
+ in: query
+ description: selects EI jobs of matching EI type
+ allowEmptyValue: false
+ schema:
+ type: string
+ - name: owner
+ in: query
+ description: selects EI jobs for one EI job owner
+ allowEmptyValue: false
+ schema:
+ type: string
+ responses:
+ 200:
+ description: EI job identifiers
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: string
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information type is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+ /A1-EI/v1/eijobs/{eiJobId}/status:
+ get:
+ tags:
+ - A1-EI (enrichment information)
+ summary: EI job status
+ operationId: getEiJobStatusUsingGET
+ parameters:
+ - name: eiJobId
+ in: path
+ description: eiJobId
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: EI job status
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EiJobStatusObject'
+ 401:
+ description: Unauthorized
+ content: {}
+ 403:
+ description: Forbidden
+ content: {}
+ 404:
+ description: Enrichment Information job is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
+ deprecated: false
+components:
+ schemas:
+ producer_ei_job_request:
+ title: producer_ei_job_request
+ required:
+ - ei_job_identity
+ type: object
+ properties:
+ owner:
+ type: string
+ description: The owner of the job
+ ei_job_identity:
+ type: string
+ description: Idenitity of the EI job
+ ei_job_data:
+ type: object
+ properties: {}
+ description: Json for the job data
+ target_uri:
+ type: string
+ description: URI for the target of the EI
+ ei_type_identity:
+ type: string
+ description: Type idenitity for the job
+ description: The body of the EI producer callbacks for EI job creation and deletion
+ EiTypeObject:
+ title: EiTypeObject
+ type: object
+ description: Information for an EI type
+ producer_ei_type_registration_info:
+ title: producer_ei_type_registration_info
+ required:
+ - ei_type_identity
+ type: object
+ properties:
+ ei_type_identity:
+ type: string
+ description: EI type identity
+ ei_job_data_schema:
+ type: object
+ properties: {}
+ description: Json schema for the job data
+ description: Information for an EI type
+ status_info:
+ title: status_info
+ type: object
+ properties:
+ no_of_producers:
+ type: integer
+ description: Number of EI producers
+ format: int32
+ no_of_jobs:
+ type: integer
+ description: Number of EI jobs
+ format: int32
+ no_of_types:
+ type: integer
+ description: Number of EI types
+ format: int32
+ status:
+ type: string
+ description: status text
+ Mono«ResponseEntity«object»»:
+ title: Mono«ResponseEntity«object»»
+ type: object
+ producer_ei_type_info:
+ title: producer_ei_type_info
+ type: object
+ properties:
+ ei_producer_ids:
+ type: array
+ description: Registered producers
+ items:
+ type: string
+ ei_job_data_schema:
+ type: object
+ properties: {}
+ description: Json schema for the job data
+ description: Information for an EI type
+ producer_registration_info:
+ title: producer_registration_info
+ required:
+ - ei_job_callback_url
+ - ei_producer_supervision_callback_url
+ - supported_ei_types
+ type: object
+ properties:
+ supported_ei_types:
+ type: array
+ description: Supported EI types
+ items:
+ $ref: '#/components/schemas/producer_ei_type_registration_info'
+ ei_producer_supervision_callback_url:
+ type: string
+ description: callback for producer supervision
+ ei_job_callback_url:
+ type: string
+ description: callback for EI job
+ description: Information for an EI producer
+ producer_status:
+ title: producer_status
+ required:
+ - operational_state
+ type: object
+ properties:
+ operational_state:
+ type: string
+ description: |-
+ Operational state, values:
+ ENABLED: TBD
+ DISABLED: TBD.
+ enum:
+ - ENABLED
+ - DISABLED
+ description: Status for an EI Producer
+ ProblemDetails:
+ title: ProblemDetails
+ type: object
+ properties:
+ detail:
+ type: string
+ description: A human-readable explanation specific to this occurrence of
+ the problem.
+ example: EI job type not found
+ status:
+ type: integer
+ description: The HTTP status code generated by the origin server for this
+ occurrence of the problem.
+ format: int32
+ example: 404
+ description: A problem detail to carry details in a HTTP response according
+ to RFC 7807
+ Void:
+ title: Void
+ type: object
+ description: Void/empty
+ EiJobStatusObject:
+ title: EiJobStatusObject
+ required:
+ - eiJobStatus
+ type: object
+ properties:
+ eiJobStatus:
+ type: string
+ description: |-
+ values:
+ ENABLED: the A1-EI producer is able to deliver EI result for the EI job
+ DISABLED: the A1-EI producer is unable to deliver EI result for the EI job
+ enum:
+ - ENABLED
+ - DISABLED
+ description: Status for an EI job
+ EiJobObject:
+ title: EiJobObject
+ required:
+ - eiTypeId
+ - jobDefinition
+ - jobOwner
+ - jobResultUri
+ type: object
+ properties:
+ eiTypeId:
+ type: string
+ description: EI type Idenitifier of the EI job
+ jobResultUri:
+ type: string
+ description: The target URI of the EI data
+ jobOwner:
+ type: string
+ description: Identity of the owner of the job
+ jobStatusNotificationUri:
+ type: string
+ description: The target of EI job status notifications
+ jobDefinition:
+ type: object
+ properties: {}
+ description: EI type specific job data
+ description: Information for an Enrichment Information Job
diff --git a/enrichment-coordinator-service/pom.xml b/enrichment-coordinator-service/pom.xml
index d34c9a6..2a65315 100644
--- a/enrichment-coordinator-service/pom.xml
+++ b/enrichment-coordinator-service/pom.xml
@@ -56,6 +56,7 @@
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
<formatter-maven-plugin.version>2.12.2</formatter-maven-plugin.version>
<spotless-maven-plugin.version>1.24.3</spotless-maven-plugin.version>
+ <swagger-codegen-maven-plugin.version>3.0.11</swagger-codegen-maven-plugin.version>
<docker-maven-plugin>0.30.0</docker-maven-plugin>
<version.dmaap>1.1.11</version.dmaap>
<javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>
@@ -281,6 +282,27 @@
</executions>
</plugin>
<plugin>
+ <groupId>io.swagger.codegen.v3</groupId>
+ <artifactId>swagger-codegen-maven-plugin</artifactId>
+ <version>${swagger-codegen-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <inputSpec>${project.basedir}/api/ecs-api.json</inputSpec>
+ <language>openapi-yaml</language>
+ <output>${project.basedir}/api</output>
+ <configOptions>
+ <outputFile>ecs-api.yaml</outputFile>
+ </configOptions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker-maven-plugin}</version>
diff --git a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java b/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java
index c5ee82a..51d0ee1 100644
--- a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java
+++ b/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java
@@ -162,7 +162,7 @@
assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.OK);
String indented = (new JSONObject(resp.getBody())).toString(4);
- try (PrintStream out = new PrintStream(new FileOutputStream("../docs/offeredapis/swagger/ecs-api.json"))) {
+ try (PrintStream out = new PrintStream(new FileOutputStream("api/ecs-api.json"))) {
out.print(indented);
}
}