-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unwanted sorting components (#11)
* Fix for unwanted sorting of components Co-authored-by: Tim <>
- Loading branch information
Showing
7 changed files
with
526 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- schemas | ||
#- messages | ||
- parameters | ||
- messageTraits | ||
- operationTraits | ||
- securitySchemes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,249 @@ | ||
asyncapi: 2.2.0 | ||
info: | ||
title: Streetlights Kafka API | ||
version: 1.0.0 | ||
description: | | ||
The Smartylighting Streetlights API allows you to remotely manage the city lights. | ||
### Check out its awesome features: | ||
* Turn a specific streetlight on/off 🌃 | ||
* Dim a specific streetlight 😎 | ||
* Receive real-time information about environmental lighting conditions 📈 | ||
license: | ||
name: Apache 2.0 | ||
url: https://www.apache.org/licenses/LICENSE-2.0 | ||
servers: | ||
production: | ||
url: test.mosquitto.org:{port} | ||
protocol: mqtt | ||
description: Test broker | ||
variables: | ||
port: | ||
description: Secure connection (TLS) is available through port 8883. | ||
default: '1883' | ||
enum: | ||
- '1883' | ||
- '8883' | ||
security: | ||
- apiKey: [] | ||
- supportedOauthFlows: | ||
- streetlights:on | ||
- streetlights:off | ||
- streetlights:dim | ||
- openIdConnectWellKnown: [] | ||
defaultContentType: application/json | ||
channels: | ||
smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured: | ||
description: The topic on which measured values may be produced and consumed. | ||
parameters: | ||
streetlightId: | ||
$ref: '#/components/parameters/streetlightId' | ||
subscribe: | ||
operationId: measuredStreetlight | ||
message: | ||
$ref: '#/components/messages/turnOnOff' | ||
traits: | ||
- $ref: '#/components/operationTraits/kafka' | ||
publish: | ||
operationId: receiveLightMeasurement | ||
summary: Inform about environmental lighting conditions of a particular streetlight. | ||
message: | ||
$ref: '#/components/messages/lightMeasured' | ||
traits: | ||
- $ref: '#/components/operationTraits/kafka' | ||
smartylighting.streetlights.1.0.action.{streetlightId}.turn.on: | ||
parameters: | ||
streetlightId: | ||
$ref: '#/components/parameters/streetlightId' | ||
subscribe: | ||
operationId: turnOn | ||
message: | ||
$ref: '#/components/messages/turnOnOff' | ||
traits: | ||
- $ref: '#/components/operationTraits/kafka' | ||
smartylighting.streetlights.1.0.action.{streetlightId}.turn.off: | ||
parameters: | ||
streetlightId: | ||
$ref: '#/components/parameters/streetlightId' | ||
subscribe: | ||
operationId: turnOff | ||
message: | ||
$ref: '#/components/messages/turnOnOff' | ||
traits: | ||
- $ref: '#/components/operationTraits/kafka' | ||
smartylighting.streetlights.1.0.action.{streetlightId}.dim: | ||
parameters: | ||
streetlightId: | ||
$ref: '#/components/parameters/streetlightId' | ||
subscribe: | ||
operationId: dimLight | ||
message: | ||
title: Dim light | ||
summary: Command a particular streetlight to dim the lights. | ||
traits: | ||
- $ref: '#/components/messageTraits/commonHeaders' | ||
payload: | ||
type: object | ||
properties: | ||
percentage: | ||
type: integer | ||
description: Percentage to which the light should be dimmed to. | ||
minimum: 0 | ||
maximum: 100 | ||
sentAt: | ||
$ref: '#/components/schemas/sentAt' | ||
traits: | ||
- $ref: '#/components/operationTraits/kafka' | ||
components: | ||
parameters: | ||
streetlightId: | ||
description: The ID of the streetlight. | ||
schema: | ||
type: string | ||
dimId: | ||
description: The ID of the dimmer. | ||
schema: | ||
type: string | ||
abcId: | ||
description: The ID of the abc. | ||
schema: | ||
type: number | ||
messages: | ||
lightMeasured: | ||
name: lightMeasured | ||
title: Light measured | ||
summary: Inform about environmental lighting conditions of a particular streetlight. | ||
contentType: application/json | ||
traits: | ||
- $ref: '#/components/messageTraits/commonHeaders' | ||
payload: | ||
$ref: '#/components/schemas/lightMeasuredPayload' | ||
turnOnOff: | ||
name: turnOnOff | ||
title: Turn on/off | ||
summary: Command a particular streetlight to turn the lights on or off. | ||
traits: | ||
- $ref: '#/components/messageTraits/commonHeaders' | ||
payload: | ||
$ref: '#/components/schemas/turnOnOffPayload' | ||
dimLight: | ||
name: dimLight | ||
title: Dim light | ||
summary: Command a particular streetlight to dim the lights. | ||
traits: | ||
- $ref: '#/components/messageTraits/commonHeaders' | ||
payload: | ||
type: object | ||
properties: | ||
percentage: | ||
type: integer | ||
description: Percentage to which the light should be dimmed to. | ||
minimum: 0 | ||
maximum: 100 | ||
sentAt: | ||
$ref: '#/components/schemas/sentAt' | ||
schemas: | ||
lightMeasuredPayload: | ||
type: object | ||
properties: | ||
lumens: | ||
description: Light intensity measured in lumens. | ||
type: integer | ||
minimum: 0 | ||
sentAt: | ||
$ref: '#/components/schemas/sentAt' | ||
turnOnOffPayload: | ||
type: object | ||
properties: | ||
command: | ||
description: Whether to turn on or off the light. | ||
type: string | ||
enum: | ||
- 'on' | ||
- 'off' | ||
sentAt: | ||
$ref: '#/components/schemas/sentAt' | ||
dimLightPayload: | ||
type: object | ||
properties: | ||
percentage: | ||
description: Percentage to which the light should be dimmed to. | ||
type: integer | ||
minimum: 0 | ||
maximum: 100 | ||
sentAt: | ||
$ref: '#/components/schemas/sentAt' | ||
sentAt: | ||
description: Date and time when the message was sent. | ||
type: string | ||
format: date-time | ||
messageTraits: | ||
eventHeaders: | ||
headers: | ||
type: object | ||
properties: | ||
event-header: | ||
type: integer | ||
minimum: 0 | ||
maximum: 100 | ||
commonHeaders: | ||
headers: | ||
type: object | ||
properties: | ||
my-app-header: | ||
type: integer | ||
minimum: 0 | ||
maximum: 100 | ||
operationTraits: | ||
ws: | ||
bindings: | ||
ws: | ||
clientId: ws-id | ||
kafka: | ||
bindings: | ||
kafka: | ||
clientId: my-app-id | ||
http: | ||
bindings: | ||
http: | ||
clientId: http-id | ||
securitySchemes: | ||
supportedOauthFlows: | ||
type: oauth2 | ||
description: Flows to support OAuth 2.0 | ||
flows: | ||
implicit: | ||
authorizationUrl: https://authserver.example/auth | ||
scopes: | ||
streetlights:on: Ability to switch lights on | ||
streetlights:off: Ability to switch lights off | ||
streetlights:dim: Ability to dim the lights | ||
password: | ||
tokenUrl: https://authserver.example/token | ||
scopes: | ||
streetlights:on: Ability to switch lights on | ||
streetlights:off: Ability to switch lights off | ||
streetlights:dim: Ability to dim the lights | ||
clientCredentials: | ||
tokenUrl: https://authserver.example/token | ||
scopes: | ||
streetlights:on: Ability to switch lights on | ||
streetlights:off: Ability to switch lights off | ||
streetlights:dim: Ability to dim the lights | ||
authorizationCode: | ||
authorizationUrl: https://authserver.example/auth | ||
tokenUrl: https://authserver.example/token | ||
refreshUrl: https://authserver.example/refresh | ||
scopes: | ||
streetlights:on: Ability to switch lights on | ||
streetlights:off: Ability to switch lights off | ||
streetlights:dim: Ability to dim the lights | ||
openIdConnectWellKnown: | ||
type: openIdConnect | ||
openIdConnectUrl: https://authserver.example/.well-known | ||
apiKey: | ||
type: apiKey | ||
in: user | ||
description: Provide your API key as the user and leave the password empty. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
verbose: true | ||
sortComponentsFile: customSortComponents.yaml | ||
output: output.yaml | ||
|
Oops, something went wrong.