Skip to content

Commit ec10355

Browse files
committed
added apis endpoints
1 parent c1c4216 commit ec10355

File tree

2 files changed

+120
-52
lines changed

2 files changed

+120
-52
lines changed

JSON_for_IO-Link_unmerged.yaml

Lines changed: 83 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -89,70 +89,90 @@ paths:
8989
################################################################################
9090
# general
9191
################################################################################
92-
"/openapi":
92+
/apis:
9393
get:
9494
tags:
9595
- general
96-
operationId: getOpenApiDocument
96+
operationId: getApis
9797
summary: >-
98-
Get the OpenAPI interface description of the IO-Link Master.
98+
Read the list of available IO-Link-related OpenAPI and AsyncAPI specifications.
9999
description: >-
100-
Get the OpenAPI interface description of the IO-Link Master. The general OpenAPI description should be adjusted in regards of vendor specific characteristics like used security schemas, supported endpoints or additional information.
100+
Read the list of available IO-Link-related OpenAPI and AsyncAPI specifications. The OpenAPI or AsyncAPI specifications should be aligned with vendor-specific requirements such as used security schemas, supported endpoints, or additional information.
101101
responses:
102102
"200":
103103
description: Successful operation
104104
content:
105-
application/text:
105+
application/json:
106+
schema:
107+
$ref: "./schemas.yaml#/schemas/apisGet"
108+
"401":
109+
$ref: "#/components/responses/HTTP_401"
110+
"403":
111+
$ref: "#/components/responses/HTTP_403"
112+
"500":
113+
description: Internal Server Error
114+
content:
115+
application/json:
116+
schema:
117+
$ref: "./schemas.yaml#/schemas/errorObject_101"
118+
/apis/{apiId}:
119+
get:
120+
tags:
121+
- general
122+
operationId: getApisApiId
123+
summary: >-
124+
Read a specific OpenAPI or AsyncAPI specification.
125+
description: >-
126+
Read a specific OpenAPI or AsyncAPI specification.
127+
parameters:
128+
- $ref: "#/components/parameters/apiId"
129+
responses:
130+
"200":
131+
description: Successful operation
132+
content:
133+
application/json:
106134
schema:
107-
type: string
135+
type: object
136+
required:
137+
- url
138+
properties:
139+
url:
140+
type: string
141+
description: The url referring to the OpenAPI or AsyncAPI specification.
142+
example: https://github.com/iolinkcommunity/JSON_for_IO-Link/blob/2.0.0/JSON_for_IO-Link.yaml
108143
examples:
109144
"url-github":
110-
value: https://github.com/iolinkcommunity/JSON_for_IO-Link/blob/1.0.0/JSON_for_IO-Link.yaml
145+
value:
146+
"url": "https://github.com/iolinkcommunity/JSON_for_IO-Link/blob/2.0.0/JSON_for_IO-Link.yaml"
111147
"url-vendor":
112-
value: >-
113-
https://www.iolink-master-vendor.com/de/de/p/p672882
148+
value:
149+
"url": "https://www.iolink-master-vendor.com/de/de/p/p672882"
114150
application/yaml:
115151
example:
116152
"yaml":
117153
value: >-
118154
openapi: 3.0.3
119155
info:
120-
description: >-
121-
This is a sample IO-Link Master server. You can find out more about IO-Link
122-
at [http://www.io-link.com](http://www.io-link.com)
123-
# Description
124-
* Draft for version 2.x
125-
## Disclaimer:
126-
>The attention of adopters is directed to the possibility that compliance with or adoption of IO-Link Community specifications may require use of an invention covered by patent rights. The IO-Link Community shall not be responsible for identifying patents for which a license may be required by any IO-Link Community specification, or for conducting legal inquiries into the legal validity or scope of those patents that are brought to its attention. IO-Link Community specifications are prospective and advisory only. Prospective users are responsible for protecting themselves against liability for infringement of patents.
127-
>The information contained in this document is subject to change without notice. The material in this document details an IO-Link Community specification in accordance with the license and notices set forth on this page. This document does not represent a commitment to implement any portion of this specification in any company's products.
128-
>WHILE THE INFORMATION IN THIS PUBLICATION IS BELIEVED TO BE ACCURATE, THE IO-LINK COMMUNITY MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL INCLUDING, BUT NOT LIMITED TO ANY WARRANTY OF TITLE OR OWNERSHIP, IMPLIED WARRANTY OF MERCHANTABILITY OR WARRANTY OF FITNESS FOR PARTICULAR PURPOSE OR USE.
129-
>In no event shall the IO-Link Community be liable for errors contained herein or for indirect, incidental, special, consequential, reliance or cover damages, including loss of profits, revenue, data or use, incurred by any user or any third party. Compliance with this specification does not absolve manufacturers of IO-Link equipment, from the requirements of safety and regulatory agencies (TÜV, BIA, UL, CSA, etc.).
156+
description: >-
157+
This is a sample IO-Link Master server. You can find out more about IO-Link
158+
at [http://www.io-link.com](http://www.io-link.com)
159+
# Description
160+
* Version 2.0.0
161+
## Disclaimer:
162+
>The attention of adopters is directed to the possibility that compliance with or adoption of IO-Link Community specifications may require use of an invention covered by patent rights. The IO-Link Community shall not be responsible for identifying patents for which a license may be required by any IO-Link Community specification, or for conducting legal inquiries into the legal validity or scope of those patents that are brought to its attention. IO-Link Community specifications are prospective and advisory only. Prospective users are responsible for protecting themselves against liability for infringement of patents.
163+
>The information contained in this document is subject to change without notice. The material in this document details an IO-Link Community specification in accordance with the license and notices set forth on this page. This document does not represent a commitment to implement any portion of this specification in any company's products.
164+
>WHILE THE INFORMATION IN THIS PUBLICATION IS BELIEVED TO BE ACCURATE, THE IO-LINK COMMUNITY MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL INCLUDING, BUT NOT LIMITED TO ANY WARRANTY OF TITLE OR OWNERSHIP, IMPLIED WARRANTY OF MERCHANTABILITY OR WARRANTY OF FITNESS FOR PARTICULAR PURPOSE OR USE.
165+
>In no event shall the IO-Link Community be liable for errors contained herein or for indirect, incidental, special, consequential, reliance or cover damages, including loss of profits, revenue, data or use, incurred by any user or any third party. Compliance with this specification does not absolve manufacturers of IO-Link equipment, from the requirements of safety and regulatory agencies (TÜV, BIA, UL, CSA, etc.).
130166
131-
132-
>IO-Link is a registered trademark. It may be used only by the members of the IO-Link Community and non-members who had acquired the corresponding license. For more detailed information on its use, refer to the rules of the IO-Link Community at www.io-link.com.
133-
version: 2.0.0
134-
title: Swagger IO-Link Master
135-
contact:
136-
137-
license:
138-
name: tbd
139-
url: 'http://www.io-link.com'
167+
>IO-Link is a registered trademark. It may be used only by the members of the IO-Link Community and non-members who had acquired the corresponding license. For more detailed information on its use, refer to the rules of the IO-Link Community at www.io-link.com.
168+
version: 2.0.0
169+
title: Swagger IO-Link Master
170+
contact:
171+
172+
license:
173+
name: tbd
174+
url: 'http://www.io-link.com'
140175
...
141-
application/json:
142-
example:
143-
"json":
144-
value:
145-
{
146-
"openapi": "3.0.3",
147-
"info": null,
148-
"description": "This is a sample IO-Link Master server. You can find out more about IO-Link at [http://www.io-link.com](http://www.io-link.com) # Description * Draft for version 2.x ## Disclaimer: >The attention of adopters is directed to the possibility that compliance with or adoption of IO-Link Community specifications may require use of an invention covered by patent rights. The IO-Link Community shall not be responsible for identifying patents for which a license may be required by any IO-Link Community specification, or for conducting legal inquiries into the legal validity or scope of those patents that are brought to its attention. IO-Link Community specifications are prospective and advisory only. Prospective users are responsible for protecting themselves against liability for infringement of patents. >The information contained in this document is subject to change without notice. The material in this document details an IO-Link Community specification in accordance with the license and notices set forth on this page. This document does not represent a commitment to implement any portion of this specification in any company's products. >WHILE THE INFORMATION IN THIS PUBLICATION IS BELIEVED TO BE ACCURATE, THE IO-LINK COMMUNITY MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL INCLUDING, BUT NOT LIMITED TO ANY WARRANTY OF TITLE OR OWNERSHIP, IMPLIED WARRANTY OF MERCHANTABILITY OR WARRANTY OF FITNESS FOR PARTICULAR PURPOSE OR USE. >In no event shall the IO-Link Community be liable for errors contained herein or for indirect, incidental, special, consequential, reliance or cover damages, including loss of profits, revenue, data or use, incurred by any user or any third party. Compliance with this specification does not absolve manufacturers of IO-Link equipment, from the requirements of safety and regulatory agencies (TÜV, BIA, UL, CSA, etc.). \n\n>IO-Link is a registered trademark. It may be used only by the members of the IO-Link Community and non-members who had acquired the corresponding license. For more detailed information on its use, refer to the rules of the IO-Link Community at www.io-link.com.",
149-
"version": "2.0.0",
150-
"title": "Swagger IO-Link Master",
151-
"contact": { "email": "[email protected]" },
152-
"license":
153-
{ "name": "tbd", "url": "http://www.io-link.com" },
154-
...: "to be continued",
155-
}
156176
"401":
157177
$ref: "#/components/responses/HTTP_401"
158178
"403":
@@ -163,14 +183,17 @@ paths:
163183
application/json:
164184
schema:
165185
$ref: "./schemas.yaml#/schemas/errorObject_101"
166-
/apiversion:
186+
/apis/{apiId}/version:
167187
get:
168188
tags:
169189
- general
170190
operationId: getApiVersion
171-
summary: Get the REST interface version identification.
191+
summary: Read version information of a specific OpenAPI or AsyncAPI specification.
172192
description: >-
173-
This version relates to the released version by the iolink community on github (e.g. https://github.com/iolinkcommunity/JSON_for_IO-Link/releases). It can be extended by vendor specific parts.
193+
The provided version aligns with the released version by the iolink community on github (e.g. https://github.com/iolinkcommunity/JSON_for_IO-Link/releases).
194+
It may be extended by vendor specific parts.
195+
parameters:
196+
- $ref: "#/components/parameters/apiId"
174197
responses:
175198
"200":
176199
description: Successful operation
@@ -183,16 +206,16 @@ paths:
183206
properties:
184207
version:
185208
type: string
186-
additionalInfo:
209+
description:
187210
type: string
188211
examples:
189-
"mandatory":
212+
"mandatory content":
190213
value:
191-
version: 1.0.0
192-
"optional addition":
214+
version: 2.0.0
215+
"optional content":
193216
value:
194-
version: 1.0.0
195-
additionalInfo: 1.2.3-feature-xyz
217+
version: 2.0.0
218+
description: 1.2.3-feature-xyz
196219
"401":
197220
$ref: "#/components/responses/HTTP_401"
198221
"403":
@@ -4104,6 +4127,14 @@ components:
41044127
Maintenance: priviledged access for reading and writing all endpoints
41054128
Specialist: more priviledged access for advanced features like firmware update
41064129
parameters:
4130+
apiId:
4131+
name: apiId
4132+
description: API identifier of an OpenAPI or AsyncAPI specification.
4133+
required: true
4134+
in: path
4135+
schema:
4136+
type: string
4137+
pattern: "^[A-Za-z0-9._-]+$"
41074138
artifact:
41084139
name: artifact
41094140
description: IO-Link IODD Artifacts

schemas.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,43 @@ schemas:
283283
- NOT_AVAILABLE # NOT_AVAILABLE
284284
- PORT_POWER_OFF # PORT_POWER_OFF
285285
- PAIRING_FAULT # PAIRING_TIMEOUT, PAIRING_WRONG_SLOTTYPE
286+
apisGet:
287+
type: array
288+
items:
289+
type: object
290+
required:
291+
- apiId
292+
- protocol
293+
- version
294+
- description
295+
properties:
296+
apiId:
297+
type: string
298+
pattern: "^[A-Za-z0-9._-]+$"
299+
description: An identifier representing a specific OpenAPI or AsyncAPI specification.
300+
protocol:
301+
type: string
302+
enum:
303+
- REST
304+
- MQTT
305+
description: The specification type.
306+
version:
307+
type: string
308+
description: |
309+
The version of the OpenAPI or AsyncAPI specification.
310+
description:
311+
type: string
312+
description: |
313+
Additional information about the provided specification.
314+
example:
315+
- apiId: JsonForIoLink_REST_v2
316+
protocol: REST
317+
version: 2.0.0
318+
description: The latest version of the JSON for IO-Link OpenAPI specification.
319+
- apiId: JsonForIoLink_MQTT_v1
320+
protocol: MQTT
321+
version: 1.0.1
322+
description: The latest version of the JSON for IO-Link AsyncAPI specification.
286323
masterIdentificationPost:
287324
type: object
288325
description: At least one of the properties has to be used, if the request is issued.

0 commit comments

Comments
 (0)