diff --git a/JSON_for_IO-Link.yaml b/JSON_for_IO-Link.yaml index 9f4f538..5d6efdc 100644 --- a/JSON_for_IO-Link.yaml +++ b/JSON_for_IO-Link.yaml @@ -750,6 +750,7 @@ paths: $ref: "./schemas.yaml#/schemas/mqttConfigurationTopicGet" example: - topicId: 1 + activate: true topicName: Sensor34/processData qos: 1_AT_LEAST_ONCE deviceAlias: DT35 @@ -760,11 +761,13 @@ paths: value: 10 unit: ms - topicId: 2 + activate: true topicName: Sensor34/event qos: 1_AT_LEAST_ONCE deviceAlias: TAD081 event: {} - topicId: 3 + activate: false topicName: PD qos: 0_ONLY_ONCE deviceAlias: BNI_IOL @@ -773,6 +776,7 @@ paths: format: iodd onChange: true - topicId: 4 + activate: false topicName: DT35_CycleTime qos: 0_ONLY_ONCE deviceAlias: DT35 @@ -782,6 +786,7 @@ paths: format: iodd onChange: true - topicId: 5 + activate: true topicName: deviceTemperature qos: 0_ONLY_ONCE deviceAlias: master1port2 @@ -814,7 +819,7 @@ paths: schema: $ref: "./schemas.yaml#/schemas/errorObject_106" post: - operationId: PostMqttTopicsTopicId + operationId: PostMqttTopics tags: - mqtt summary: Create a new MQTT topic. @@ -828,6 +833,7 @@ paths: examples: Process Data: value: + activate: true qos: 1_AT_LEAST_ONCE deviceAlias: DT35 processData: @@ -838,11 +844,13 @@ paths: unit: ms Event: value: + activate: true qos: 1_AT_LEAST_ONCE deviceAlias: TAD081 event: {} Parameter (Index): value: + activate: false qos: 0_ONLY_ONCE deviceAlias: master1port1 parameter: @@ -853,6 +861,7 @@ paths: unit: ms Parameter (ParameterName): value: + activate: true topicName: deviceTemperature qos: 0_ONLY_ONCE deviceAlias: AHM36A @@ -927,6 +936,7 @@ paths: Process Data: value: topicId: 1 + activate: true topicName: PD input qos: 1_AT_LEAST_ONCE deviceAlias: DT35 @@ -939,6 +949,7 @@ paths: Event: value: topicId: 2 + activate: true topicName: Event qos: 1_AT_LEAST_ONCE deviceAlias: TAD081 @@ -946,6 +957,7 @@ paths: Parameter (Index): value: topicId: 3 + activate: true topicName: devvice/indexXY qos: 0_ONLY_ONCE deviceAlias: master1port1 @@ -958,6 +970,7 @@ paths: Parameter (ParameterName): value: topicId: 5 + activate: true topicName: deviceTemperature qos: 0_ONLY_ONCE deviceAlias: AHM36A @@ -991,6 +1004,104 @@ paths: application/json: schema: $ref: "./schemas.yaml#/schemas/errorObject_106" + post: + operationId: PostMqttTopicsTopicId + parameters: + - $ref: "#/components/parameters/mqttTopicId" + tags: + - mqtt + summary: Change or deactivate one MQTT topic. + description: Change or deactivate one MQTT topic. + requestBody: + required: true + content: + application/json: + schema: + $ref: "./schemas.yaml#/schemas/mqttConfigurationTopicsTopicPost" + examples: + Deactivate Topic: + value: + activate: false + Activate Topic: + value: + activate: true + Process Data: + value: + topicId: 1 + activate: true + topicName: PD input + qos: 1_AT_LEAST_ONCE + deviceAlias: DT35 + processData: + direction: getData + format: iodd + interval: + value: 10 + unit: ms + Event: + value: + topicId: 2 + activate: true + topicName: Event + qos: 1_AT_LEAST_ONCE + deviceAlias: TAD081 + event: {} + Parameter (Index): + value: + topicId: 3 + topicName: devvice/indexXY + qos: 0_ONLY_ONCE + deviceAlias: master1port1 + parameter: + index: 86 + format: byteArray + interval: + value: 10 + unit: ms + Parameter (ParameterName): + value: + topicId: 5 + activate: true + topicName: deviceTemperature + qos: 0_ONLY_ONCE + deviceAlias: AHM36A + parameter: + parameterName: Temperature1 + format: iodd + interval: + value: 1000 + unit: ms + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: integer + "401": + $ref: "#/components/responses/HTTP_401" + "403": + $ref: "#/components/responses/HTTP_403" + "404": + description: Not Found + content: + application/json: + schema: + oneOf: + - $ref: "./schemas.yaml#/schemas/errorObject_103" + - $ref: "./schemas.yaml#/schemas/errorObject_301" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "./schemas.yaml#/schemas/errorObject_101" + "501": + description: Not Implemented + content: + application/json: + schema: + $ref: "./schemas.yaml#/schemas/errorObject_106" delete: operationId: DeleteMqttTopicsTopicId tags: @@ -3728,7 +3839,6 @@ components: minimum: 0 maximum: 255 required: true - responses: HTTP_401: description: Authentication information is missing or invalid diff --git a/schemas.yaml b/schemas.yaml index 4a81c4d..e1a187a 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -636,6 +636,8 @@ schemas: - qos - deviceAlias properties: + activate: + type: boolean qos: type: string enum: @@ -660,6 +662,29 @@ schemas: topicName: type: string - $ref: "#/schemas/mqttConfigurationTopic" + mqttConfigurationTopicsTopicPost: + anyOf: + - type: object + properties: + topicId: + type: integer + - type: object + properties: + topicName: + type: string + - $ref: "#/schemas/mqttConfigurationTopic" + example: + topicId: 1 + activate: true + topicName: PD input + qos: 1_AT_LEAST_ONCE + deviceAlias: DT35 + processData: + direction: getData + format: iodd + interval: + value: 10 + unit: ms mqttConfigurationTopicGet: allOf: - type: object