forked from asyncapi/saunter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
asyncapi#207 generate code from spec: msbuild target file refining (i…
…ncremental build should be working now)
- Loading branch information
Senn Geerts
authored and
Senn Geerts
committed
Jul 20, 2024
1 parent
b123783
commit 4af2a99
Showing
10 changed files
with
208 additions
and
17 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
94 changes: 94 additions & 0 deletions
94
examples/StreetlightsAPI.AsyncApiSpecFirst/specs/streetlights.json
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,94 @@ | ||
{ | ||
"asyncapi": "2.6.0", | ||
"info": { | ||
"title": "Streetlights API", | ||
"version": "1.0.0", | ||
"description": "The Smartylighting Streetlights API allows you to remotely manage the city lights.", | ||
"license": { | ||
"name": "Apache 2.0", | ||
"url": "https://www.apache.org/licenses/LICENSE-2.0" | ||
} | ||
}, | ||
"servers": { | ||
"mosquitto": { | ||
"url": "test.mosquitto.org", | ||
"protocol": "mqtt" | ||
}, | ||
"webapi": { | ||
"url": "localhost:5000", | ||
"protocol": "http" | ||
} | ||
}, | ||
"defaultContentType": "application/json", | ||
"channels": { | ||
"publish/light/measured": { | ||
"servers": [ | ||
"webapi" | ||
], | ||
"publish": { | ||
"operationId": "MeasureLight", | ||
"summary": "Inform about environmental lighting conditions for a particular streetlight.", | ||
"tags": [ | ||
{ | ||
"name": "Light" | ||
} | ||
], | ||
"message": { | ||
"$ref": "#/components/messages/lightMeasuredEvent" | ||
} | ||
} | ||
}, | ||
"subscribe/light/measured": { | ||
"servers": [ | ||
"mosquitto" | ||
], | ||
"subscribe": { | ||
"operationId": "PublishLightMeasurement", | ||
"summary": "Subscribe to environmental lighting conditions for a particular streetlight.", | ||
"tags": [ | ||
{ | ||
"name": "Light" | ||
} | ||
], | ||
"message": { | ||
"payload": { | ||
"$ref": "#/components/schemas/lightMeasuredEvent" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"lightMeasuredEvent": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "integer", | ||
"format": "int32", | ||
"description": "Id of the streetlight." | ||
}, | ||
"lumens": { | ||
"type": "integer", | ||
"format": "int32", | ||
"description": "Light intensity measured in lumens." | ||
}, | ||
"sentAt": { | ||
"type": "string", | ||
"format": "date-time", | ||
"description": "Light intensity measured in lumens." | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"messages": { | ||
"lightMeasuredEvent": { | ||
"payload": { | ||
"$ref": "#/components/schemas/lightMeasuredEvent" | ||
}, | ||
"name": "lightMeasuredEvent" | ||
} | ||
} | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
examples/StreetlightsAPI.AsyncApiSpecFirst/specs/streetlights.yml
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,61 @@ | ||
asyncapi: 2.6.0 | ||
info: | ||
title: Streetlights API 44 | ||
version: 1.0.0 | ||
description: The Smartylighting Streetlights API allows you to remotely manage the city lights. | ||
license: | ||
name: Apache 2.0 | ||
url: https://www.apache.org/licenses/LICENSE-2.0 | ||
servers: | ||
mosquitto: | ||
url: test.mosquitto.org | ||
protocol: mqtt | ||
webapi: | ||
url: localhost:5000 | ||
protocol: http | ||
defaultContentType: application/json | ||
channels: | ||
publish/light/measured: | ||
servers: | ||
- webapi | ||
publish: | ||
operationId: MeasureLight | ||
summary: Inform about environmental lighting conditions for a particular streetlight. | ||
tags: | ||
- name: Light | ||
message: | ||
$ref: '#/components/messages/lightMeasuredEvent' | ||
subscribe/light/measured: | ||
servers: | ||
- mosquitto | ||
subscribe: | ||
operationId: PublishLightMeasurement | ||
summary: Subscribe to environmental lighting conditions for a particular streetlight. | ||
tags: | ||
- name: Light | ||
message: | ||
payload: | ||
$ref: '#/components/schemas/lightMeasuredEvent' | ||
components: | ||
schemas: | ||
lightMeasuredEvent: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int32 | ||
description: Id of the streetlight. | ||
lumens: | ||
type: integer | ||
format: int32 | ||
description: Light intensity measured in lumens. | ||
sentAt: | ||
type: string | ||
format: date-time | ||
description: Light intensity measured in lumens. | ||
additionalProperties: false | ||
messages: | ||
lightMeasuredEvent: | ||
payload: | ||
$ref: '#/components/schemas/lightMeasuredEvent' | ||
name: lightMeasuredEvent |
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
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