From d66483475547dae787dd6a297e8e773c03538e44 Mon Sep 17 00:00:00 2001 From: AJ Date: Thu, 24 Oct 2024 11:44:58 -0400 Subject: [PATCH] run formatter --- .github/workflows/example_artifacts.yaml | 3 +- .github/workflows/reusable_test_runner.yaml | 5 +- .github/workflows/test.yaml | 6 +- README.md | 2 +- asyncapi.http.kafka.proxy/http-asyncapi.yaml | 20 +- asyncapi.mqtt.kafka.proxy/README.md | 1 + asyncapi.mqtt.kafka.proxy/kafka-asyncapi.yaml | 6 +- asyncapi.mqtt.kafka.proxy/mqtt-asyncapi.yaml | 172 +++++++++--------- asyncapi.mqtt.proxy/README.md | 1 + asyncapi.mqtt.proxy/mqtt-asyncapi.yaml | 6 +- asyncapi.sse.kafka.proxy/kafka-asyncapi.yaml | 16 +- asyncapi.sse.kafka.proxy/sse-asyncapi.yaml | 6 +- asyncapi.sse.proxy/sse-asyncapi.yaml | 8 +- http.filesystem/README.md | 24 +-- http.filesystem/zilla.yaml | 6 +- http.json.schema/zilla.yaml | 16 +- http.jwt/zilla.yaml | 6 +- http.kafka.crud/README.md | 2 +- http.kafka.proto.json/README.md | 94 +++++----- http.kafka.sync/README.md | 2 +- mqtt.jwt/README.md | 1 + mqtt.jwt/zilla.yaml | 6 +- mqtt.kafka.broker/zilla.yaml | 3 +- .../http-openapi.yaml | 4 +- openapi.proxy/petstore-openapi.yaml | 4 +- sse.jwt/README.md | 6 +- 26 files changed, 213 insertions(+), 213 deletions(-) diff --git a/.github/workflows/example_artifacts.yaml b/.github/workflows/example_artifacts.yaml index ef5cd763..916d5de6 100644 --- a/.github/workflows/example_artifacts.yaml +++ b/.github/workflows/example_artifacts.yaml @@ -3,7 +3,7 @@ name: Release Example Artifacts on: push: tags: - - 'v[0-9]+' + - "v[0-9]+" permissions: contents: write @@ -12,7 +12,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - name: Tar all examples diff --git a/.github/workflows/reusable_test_runner.yaml b/.github/workflows/reusable_test_runner.yaml index 0b500d9c..57df9cfe 100644 --- a/.github/workflows/reusable_test_runner.yaml +++ b/.github/workflows/reusable_test_runner.yaml @@ -7,7 +7,7 @@ on: required: true description: Directory name for the example to test type: string - + workflow_call: inputs: example-dir: @@ -15,7 +15,6 @@ on: type: string jobs: - runner: runs-on: ubuntu-latest steps: @@ -47,7 +46,7 @@ jobs: if: failure() uses: jwalton/gh-docker-logs@v2 with: - dest: './logs' + dest: "./logs" - name: Tar logs if: failure() run: tar cvzf ./logs.tgz ./logs diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fb5e5b3c..06577b77 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,7 +8,7 @@ jobs: get-examples-with-changes: runs-on: ubuntu-latest outputs: - changed_directories: ${{ steps.set-output.outputs.changed_directories }} # The `dirs` doesn't exist in the outputs of changed-files@v35 action. + changed_directories: ${{ steps.set-output.outputs.changed_directories }} # The `dirs` doesn't exist in the outputs of changed-files@v35 action. steps: - uses: actions/checkout@v4 with: @@ -20,7 +20,7 @@ jobs: with: # only get the top level example dirs that have changes dir_names: true - dir_names_max_depth: 1 + dir_names_max_depth: 1 dir_names_exclude_current_dir: true exclude_submodules: true files_ignore: | @@ -29,7 +29,7 @@ jobs: json: true quotepath: false - - name: 'Set output in the matrix format' + - name: "Set output in the matrix format" id: set-output run: echo "changed_directories={\"dir\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT" diff --git a/README.md b/README.md index 7b6f7b51..6544382a 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Options: | [grpc.kafka.proxy](grpc.kafka.proxy) | Correlates gRPC requests and responses over separate Kafka topics | | [grpc.proxy](grpc.proxy) | Proxies gRPC requests and responses sent to the gRPC server from a gRPC client | | [http.filesystem](http.filesystem) | Serves files from a directory on the local filesystem | -| [http.json.schema](http.json.schema) | Proxy request sent to the HTTP server from an HTTP client with schema enforcement | +| [http.json.schema](http.json.schema) | Proxy request sent to the HTTP server from an HTTP client with schema enforcement | | [http.jwt](http.jwt) | Echoes request sent to the HTTP server from a JWT-authorized HTTP client | | [http.kafka.async](http.kafka.async) | Correlates HTTP requests and responses over separate Kafka topics, asynchronously | | [http.kafka.avro.json](http.kafka.avro.json) | Validate messages while produce and fetch to a Kafka topic | diff --git a/asyncapi.http.kafka.proxy/http-asyncapi.yaml b/asyncapi.http.kafka.proxy/http-asyncapi.yaml index f3c3e2f5..6457acc4 100644 --- a/asyncapi.http.kafka.proxy/http-asyncapi.yaml +++ b/asyncapi.http.kafka.proxy/http-asyncapi.yaml @@ -24,7 +24,7 @@ servers: plain: host: localhost:7114 protocol: http - protocolVersion: '2.0' + protocolVersion: "2.0" defaultContentType: application/json channels: @@ -32,12 +32,12 @@ channels: address: /pets messages: pet: - $ref: '#/components/messages/pet' + $ref: "#/components/messages/pet" showPetById: address: /pets/{id} messages: pet: - $ref: '#/components/messages/pet' + $ref: "#/components/messages/pet" customers: address: /customer messages: @@ -56,14 +56,14 @@ operations: http: method: POST channel: - $ref: '#/channels/pets' + $ref: "#/channels/pets" listPets: action: receive bindings: http: method: GET channel: - $ref: '#/channels/pets' + $ref: "#/channels/pets" getPets: action: receive bindings: @@ -75,7 +75,7 @@ operations: limit: type: number channel: - $ref: '#/channels/showPetById' + $ref: "#/channels/showPetById" createCustomer: action: send bindings: @@ -101,11 +101,11 @@ operations: limit: type: number channel: - $ref: '#/channels/verifiedCustomers' + $ref: "#/channels/verifiedCustomers" components: correlationIds: customerCorrelationId: - location: '$message.header#/CorrelId' + location: "$message.header#/CorrelId" schemas: petPayload: type: object @@ -166,14 +166,14 @@ components: Inform about Pet. contentType: application/json payload: - $ref: '#/components/schemas/petPayload' + $ref: "#/components/schemas/petPayload" customer: name: Customer title: Customer summary: Information about a Customer. contentType: application/json correlationId: - $ref: '#/components/correlationIds/customerCorrelationId' + $ref: "#/components/correlationIds/customerCorrelationId" headers: type: object properties: diff --git a/asyncapi.mqtt.kafka.proxy/README.md b/asyncapi.mqtt.kafka.proxy/README.md index ac3f1af4..591a5ccd 100644 --- a/asyncapi.mqtt.kafka.proxy/README.md +++ b/asyncapi.mqtt.kafka.proxy/README.md @@ -61,6 +61,7 @@ mosquitto_pub -V '5' -t 'smartylighting/streetlights/1/0/event/1/lighting/measur ``` output: + ``` Client null sending CONNECT Client 30157eed-0ea7-42c6-91e8-466d1dd0ab66 received CONNACK (0) diff --git a/asyncapi.mqtt.kafka.proxy/kafka-asyncapi.yaml b/asyncapi.mqtt.kafka.proxy/kafka-asyncapi.yaml index f9c35bb9..0b641519 100644 --- a/asyncapi.mqtt.kafka.proxy/kafka-asyncapi.yaml +++ b/asyncapi.mqtt.kafka.proxy/kafka-asyncapi.yaml @@ -13,11 +13,11 @@ operations: onStreetlightData: action: receive channel: - $ref: '#/channels/streetlightData' + $ref: "#/channels/streetlightData" toStreetlightData: action: send channel: - $ref: '#/channels/streetlightData' + $ref: "#/channels/streetlightData" channels: streetlightData: @@ -25,7 +25,7 @@ channels: address: streetlights messages: streetlightData: - $ref: '#/components/messages/streetlightData' + $ref: "#/components/messages/streetlightData" mqttSessions: description: This channel contains MQTT sessions. address: mqtt-sessions diff --git a/asyncapi.mqtt.kafka.proxy/mqtt-asyncapi.yaml b/asyncapi.mqtt.kafka.proxy/mqtt-asyncapi.yaml index 08c7c420..e6776f24 100644 --- a/asyncapi.mqtt.kafka.proxy/mqtt-asyncapi.yaml +++ b/asyncapi.mqtt.kafka.proxy/mqtt-asyncapi.yaml @@ -7,139 +7,139 @@ info: defaultContentType: application/json servers: production: - host: 'localhost:{port}' + host: "localhost:{port}" protocol: mqtt description: Test broker variables: port: description: Secure connection (TLS) is available through port 8883. - default: '7183' + default: "7183" enum: - - '7183' + - "7183" security: - - $ref: '#/components/securitySchemes/apiKey' + - $ref: "#/components/securitySchemes/apiKey" - type: oauth2 description: Flows to support OAuth 2.0 flows: implicit: - authorizationUrl: 'https://authserver.example/auth' + authorizationUrl: "https://authserver.example/auth" availableScopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights + "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' + tokenUrl: "https://authserver.example/token" availableScopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights + "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' + tokenUrl: "https://authserver.example/token" availableScopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights + "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' + authorizationUrl: "https://authserver.example/auth" + tokenUrl: "https://authserver.example/token" + refreshUrl: "https://authserver.example/refresh" availableScopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights + "streetlights:on": Ability to switch lights on + "streetlights:off": Ability to switch lights off + "streetlights:dim": Ability to dim the lights scopes: - - 'streetlights:on' - - 'streetlights:off' - - 'streetlights:dim' - - $ref: '#/components/securitySchemes/openIdConnectWellKnown' + - "streetlights:on" + - "streetlights:off" + - "streetlights:dim" + - $ref: "#/components/securitySchemes/openIdConnectWellKnown" tags: - - name: 'env:production' + - name: "env:production" description: This environment is meant for production use case - - name: 'kind:remote' + - name: "kind:remote" description: This server is a remote server. Not exposed by the application - - name: 'visibility:public' + - name: "visibility:public" description: This resource is public and available to everyone channels: lightingMeasured: - address: 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured' + address: "smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured" messages: lightMeasured: - $ref: '#/components/messages/lightMeasured' + $ref: "#/components/messages/lightMeasured" description: The topic on which measured values may be produced and consumed. parameters: streetlightId: - $ref: '#/components/parameters/streetlightId' + $ref: "#/components/parameters/streetlightId" lightTurnOn: - address: 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on' + address: "smartylighting/streetlights/1/0/action/{streetlightId}/turn/on" messages: turnOn: - $ref: '#/components/messages/turnOnOff' + $ref: "#/components/messages/turnOnOff" parameters: streetlightId: - $ref: '#/components/parameters/streetlightId' + $ref: "#/components/parameters/streetlightId" lightTurnOff: - address: 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off' + address: "smartylighting/streetlights/1/0/action/{streetlightId}/turn/off" messages: turnOff: - $ref: '#/components/messages/turnOnOff' + $ref: "#/components/messages/turnOnOff" parameters: streetlightId: - $ref: '#/components/parameters/streetlightId' + $ref: "#/components/parameters/streetlightId" lightsDim: - address: 'smartylighting/streetlights/1/0/action/{streetlightId}/dim' + address: "smartylighting/streetlights/1/0/action/{streetlightId}/dim" messages: dimLight: - $ref: '#/components/messages/dimLight' + $ref: "#/components/messages/dimLight" parameters: streetlightId: - $ref: '#/components/parameters/streetlightId' + $ref: "#/components/parameters/streetlightId" operations: receiveLightMeasurement: action: receive channel: - $ref: '#/channels/lightingMeasured' + $ref: "#/channels/lightingMeasured" summary: >- Inform about environmental lighting conditions of a particular streetlight. traits: - - $ref: '#/components/operationTraits/mqtt' + - $ref: "#/components/operationTraits/mqtt" messages: - - $ref: '#/channels/lightingMeasured/messages/lightMeasured' + - $ref: "#/channels/lightingMeasured/messages/lightMeasured" sendLightMeasurement: action: send channel: - $ref: '#/channels/lightingMeasured' + $ref: "#/channels/lightingMeasured" summary: >- Inform about environmental lighting conditions of a particular streetlight. traits: - - $ref: '#/components/operationTraits/mqtt' + - $ref: "#/components/operationTraits/mqtt" messages: - - $ref: '#/channels/lightingMeasured/messages/lightMeasured' + - $ref: "#/channels/lightingMeasured/messages/lightMeasured" turnOn: action: send channel: - $ref: '#/channels/lightTurnOn' + $ref: "#/channels/lightTurnOn" traits: - - $ref: '#/components/operationTraits/mqtt' + - $ref: "#/components/operationTraits/mqtt" messages: - - $ref: '#/channels/lightTurnOn/messages/turnOn' + - $ref: "#/channels/lightTurnOn/messages/turnOn" turnOff: action: send channel: - $ref: '#/channels/lightTurnOff' + $ref: "#/channels/lightTurnOff" traits: - - $ref: '#/components/operationTraits/mqtt' + - $ref: "#/components/operationTraits/mqtt" messages: - - $ref: '#/channels/lightTurnOff/messages/turnOff' + - $ref: "#/channels/lightTurnOff/messages/turnOff" dimLight: action: send channel: - $ref: '#/channels/lightsDim' + $ref: "#/channels/lightsDim" traits: - - $ref: '#/components/operationTraits/mqtt' + - $ref: "#/components/operationTraits/mqtt" messages: - - $ref: '#/channels/lightsDim/messages/dimLight' + - $ref: "#/channels/lightsDim/messages/dimLight" components: messages: lightMeasured: @@ -150,25 +150,25 @@ components: streetlight. contentType: application/json traits: - - $ref: '#/components/messageTraits/commonHeaders' + - $ref: "#/components/messageTraits/commonHeaders" payload: - $ref: '#/components/schemas/lightMeasuredPayload' + $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' + - $ref: "#/components/messageTraits/commonHeaders" payload: - $ref: '#/components/schemas/turnOnOffPayload' + $ref: "#/components/schemas/turnOnOffPayload" dimLight: name: dimLight title: Dim light summary: Command a particular streetlight to dim the lights. traits: - - $ref: '#/components/messageTraits/commonHeaders' + - $ref: "#/components/messageTraits/commonHeaders" payload: - $ref: '#/components/schemas/dimLightPayload' + $ref: "#/components/schemas/dimLightPayload" schemas: lightMeasuredPayload: type: object @@ -178,18 +178,18 @@ components: minimum: 0 description: Light intensity measured in lumens. sentAt: - $ref: '#/components/schemas/sentAt' + $ref: "#/components/schemas/sentAt" turnOnOffPayload: type: object properties: command: type: string enum: - - 'on' - - 'off' + - "on" + - "off" description: Whether to turn on or off the light. sentAt: - $ref: '#/components/schemas/sentAt' + $ref: "#/components/schemas/sentAt" dimLightPayload: type: object properties: @@ -199,7 +199,7 @@ components: minimum: 0 maximum: 100 sentAt: - $ref: '#/components/schemas/sentAt' + $ref: "#/components/schemas/sentAt" sentAt: type: string format: date-time @@ -214,34 +214,34 @@ components: description: Flows to support OAuth 2.0 flows: implicit: - authorizationUrl: 'https://authserver.example/auth' + authorizationUrl: "https://authserver.example/auth" availableScopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights + "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' + tokenUrl: "https://authserver.example/token" availableScopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights + "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' + tokenUrl: "https://authserver.example/token" availableScopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights + "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' + authorizationUrl: "https://authserver.example/auth" + tokenUrl: "https://authserver.example/token" + refreshUrl: "https://authserver.example/refresh" availableScopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights + "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' + openIdConnectUrl: "https://authserver.example/.well-known" parameters: streetlightId: description: The ID of the streetlight. diff --git a/asyncapi.mqtt.proxy/README.md b/asyncapi.mqtt.proxy/README.md index a492942d..0823d796 100644 --- a/asyncapi.mqtt.proxy/README.md +++ b/asyncapi.mqtt.proxy/README.md @@ -33,6 +33,7 @@ brew install mosquitto ### Verify behavior Connect a subscribing client to mosquitto broker to port `1883`. Using mosquitto_pub client publish `{"id":"1","status":"on"}` to Zilla on port `7183`. Verify that the message arrived to on the first client. + ```bash mosquitto_sub -V '5' -t 'smartylighting/streetlights/1/0/event/+/lighting/measured' -d ``` diff --git a/asyncapi.mqtt.proxy/mqtt-asyncapi.yaml b/asyncapi.mqtt.proxy/mqtt-asyncapi.yaml index ddc5f642..694e14b3 100644 --- a/asyncapi.mqtt.proxy/mqtt-asyncapi.yaml +++ b/asyncapi.mqtt.proxy/mqtt-asyncapi.yaml @@ -16,18 +16,18 @@ channels: title: MQTT Topic to produce & consume topic. messages: item: - $ref: '#/components/messages/item' + $ref: "#/components/messages/item" operations: sendEvents: action: send channel: - $ref: '#/channels/smartylighting' + $ref: "#/channels/smartylighting" receiveEvents: action: receive channel: - $ref: '#/channels/smartylighting' + $ref: "#/channels/smartylighting" components: messages: diff --git a/asyncapi.sse.kafka.proxy/kafka-asyncapi.yaml b/asyncapi.sse.kafka.proxy/kafka-asyncapi.yaml index bd1f687f..e7996b83 100644 --- a/asyncapi.sse.kafka.proxy/kafka-asyncapi.yaml +++ b/asyncapi.sse.kafka.proxy/kafka-asyncapi.yaml @@ -9,22 +9,22 @@ servers: protocol: kafka channels: events: - address: 'events' + address: "events" messages: event: - $ref: '#/components/messages/event' + $ref: "#/components/messages/event" description: The topic on which event values may be produced and consumed. operations: receiveEvents: action: receive channel: - $ref: '#/channels/events' + $ref: "#/channels/events" summary: >- List all events. traits: - - $ref: '#/components/operationTraits/kafka' + - $ref: "#/components/operationTraits/kafka" messages: - - $ref: '#/channels/eventstore/messages/event' + - $ref: "#/channels/eventstore/messages/event" components: messages: event: @@ -34,9 +34,9 @@ components: Inform about Event. contentType: application/json traits: - - $ref: '#/components/messageTraits/commonHeaders' + - $ref: "#/components/messageTraits/commonHeaders" payload: - $ref: '#/components/schemas/eventPayload' + $ref: "#/components/schemas/eventPayload" schemas: eventPayload: type: object @@ -64,4 +64,4 @@ components: clientId: type: string enum: - - my-app-id \ No newline at end of file + - my-app-id diff --git a/asyncapi.sse.kafka.proxy/sse-asyncapi.yaml b/asyncapi.sse.kafka.proxy/sse-asyncapi.yaml index f6e9d752..589ad362 100644 --- a/asyncapi.sse.kafka.proxy/sse-asyncapi.yaml +++ b/asyncapi.sse.kafka.proxy/sse-asyncapi.yaml @@ -15,13 +15,13 @@ channels: address: /events messages: event: - $ref: '#/components/messages/event' + $ref: "#/components/messages/event" operations: receiveEvents: action: receive channel: - $ref: '#/channels/events' + $ref: "#/channels/events" components: schemas: @@ -46,4 +46,4 @@ components: Inform about Event. contentType: application/json payload: - $ref: '#/components/schemas/eventPayload' + $ref: "#/components/schemas/eventPayload" diff --git a/asyncapi.sse.proxy/sse-asyncapi.yaml b/asyncapi.sse.proxy/sse-asyncapi.yaml index 5ab92ec2..8dc1bd76 100644 --- a/asyncapi.sse.proxy/sse-asyncapi.yaml +++ b/asyncapi.sse.proxy/sse-asyncapi.yaml @@ -15,18 +15,18 @@ channels: address: /events messages: event: - $ref: '#/components/messages/event' + $ref: "#/components/messages/event" showEventById: address: /events/{id} messages: event: - $ref: '#/components/messages/event' + $ref: "#/components/messages/event" operations: getEvents: action: receive channel: - $ref: '#/channels/showEventById' + $ref: "#/channels/showEventById" components: schemas: @@ -51,4 +51,4 @@ components: Inform about Event. contentType: application/json payload: - $ref: '#/components/schemas/eventPayload' \ No newline at end of file + $ref: "#/components/schemas/eventPayload" diff --git a/http.filesystem/README.md b/http.filesystem/README.md index aab51700..8cae602d 100644 --- a/http.filesystem/README.md +++ b/http.filesystem/README.md @@ -32,12 +32,12 @@ output: ```html - -Welcome to Zilla! - - -

Welcome to Zilla!

- + + Welcome to Zilla! + + +

Welcome to Zilla!

+ ``` @@ -49,12 +49,12 @@ output: ```html - -Welcome to Zilla! - - -

Welcome to Zilla!

- + + Welcome to Zilla! + + +

Welcome to Zilla!

+ ``` diff --git a/http.filesystem/zilla.yaml b/http.filesystem/zilla.yaml index ed5e1388..61031133 100644 --- a/http.filesystem/zilla.yaml +++ b/http.filesystem/zilla.yaml @@ -9,9 +9,9 @@ bindings: port: - 7114 routes: - - when: - - port: 7114 - exit: north_http_server + - when: + - port: 7114 + exit: north_http_server north_http_server: type: http kind: server diff --git a/http.json.schema/zilla.yaml b/http.json.schema/zilla.yaml index 175d4ba8..27c5476d 100644 --- a/http.json.schema/zilla.yaml +++ b/http.json.schema/zilla.yaml @@ -44,8 +44,8 @@ bindings: content: model: json catalog: - my_catalog: - - subject: my_subject + my_catalog: + - subject: my_subject - path: /invalid.json method: PUT content-type: @@ -53,8 +53,8 @@ bindings: content: model: json catalog: - my_catalog: - - subject: my_subject + my_catalog: + - subject: my_subject exit: south_http_client south_http_client: type: http @@ -71,7 +71,7 @@ bindings: - text/plain responses: - status: 200 - content-type: + content-type: - application/json content: model: json @@ -81,7 +81,7 @@ bindings: - status: - 401 - 404 - content-type: + content-type: - text/plain content: model: string @@ -92,7 +92,7 @@ bindings: - text/plain responses: - status: 200 - content-type: + content-type: - application/json content: model: json @@ -102,7 +102,7 @@ bindings: - status: - 401 - 404 - content-type: + content-type: - text/plain content: model: string diff --git a/http.jwt/zilla.yaml b/http.jwt/zilla.yaml index 99479b84..23914c7c 100644 --- a/http.jwt/zilla.yaml +++ b/http.jwt/zilla.yaml @@ -21,9 +21,9 @@ bindings: port: - 7114 routes: - - when: - - port: 7114 - exit: north_http_server + - when: + - port: 7114 + exit: north_http_server north_http_server: type: http kind: server diff --git a/http.kafka.crud/README.md b/http.kafka.crud/README.md index 615f84c8..95927891 100644 --- a/http.kafka.crud/README.md +++ b/http.kafka.crud/README.md @@ -25,7 +25,7 @@ docker compose up -d ### Endpoints | Protocol | Method | Endpoint | Topic | Description | -|----------|--------|-------------|-----------------|-------------------------| +| -------- | ------ | ----------- | --------------- | ----------------------- | | HTTP | POST | /items | items-snapshots | Create an item. | | HTTP | PUT | /items/{id} | items-snapshots | Update item by the key. | | HTTP | DELETE | /items/{id} | items-snapshots | Delete item by the key. | diff --git a/http.kafka.proto.json/README.md b/http.kafka.proto.json/README.md index 09a8d159..30375f73 100644 --- a/http.kafka.proto.json/README.md +++ b/http.kafka.proto.json/README.md @@ -24,37 +24,37 @@ Each of the below scenarios are run from a fresh install of zilla and kafka 1. `POST` a valid request getting a `204` back - ```bash - curl --location 'http://localhost:7114/requests' \ - --header 'Content-Type: application/json' \ - --data '{ - "message": "hello world", - "count": 10 - }' -v - ``` +```bash +curl --location 'http://localhost:7114/requests' \ +--header 'Content-Type: application/json' \ +--data '{ + "message": "hello world", + "count": 10 +}' -v +``` 1. `POST` an invalid request getting a `400` back and logs `MODEL_PROTOBUF_VALIDATION_FAILED A message payload failed validation. Cannot find field: invalid in message Request.` to stdout - ```bash - curl --location 'http://localhost:7114/requests' \ - --header 'Content-Type: application/json' \ - --data '{ - "message": "hello world", - "count": 10, - "invalid": "field" - }' -v - ``` +```bash +curl --location 'http://localhost:7114/requests' \ +--header 'Content-Type: application/json' \ +--data '{ + "message": "hello world", + "count": 10, + "invalid": "field" +}' -v +``` 1. `POST` a valid request getting a `400` back and logs `MODEL_PROTOBUF_VALIDATION_FAILED A message payload failed validation. Field Request.message has already been set..` to stdout - ```bash - curl --location 'http://localhost:7114/requests' \ - --header 'Content-Type: application/json' \ - --data '{ - "message": "hello world", - "count": 10 - }' -v - ``` +```bash +curl --location 'http://localhost:7114/requests' \ +--header 'Content-Type: application/json' \ +--data '{ + "message": "hello world", + "count": 10 +}' -v +``` ### Sending an invalid `message` field @@ -62,31 +62,31 @@ Sending an invalid `message` field causes subsequent requests to take ~10 min to 1. `POST` a valid request getting a `204` back - ```bash - curl --location 'http://localhost:7114/requests' \ - --header 'Content-Type: application/json' \ - --data '{ - "message": "hello message", - "count": 10 - }' -v - ``` +```bash +curl --location 'http://localhost:7114/requests' \ +--header 'Content-Type: application/json' \ +--data '{ + "message": "hello message", + "count": 10 +}' -v +``` 1. `POST` an invalid `"messages"` field request getting a `400` back and immediately post the correct payload after. Run both curl commands at the same time and sometimes the second one works and other times it will hang until it gets a `204` back after ~10min and the message is not on the Kafka topic - ```bash - curl --location 'http://localhost:7114/requests' \ - --header 'Content-Type: application/json' \ - --data '{ - "messages": "hello messages", - "count": 10 - }' -v - curl --location 'http://localhost:7114/requests' \ - --header 'Content-Type: application/json' \ - --data '{ - "message": "hello messages", - "count": 10 - }' -v - ``` +```bash +curl --location 'http://localhost:7114/requests' \ +--header 'Content-Type: application/json' \ +--data '{ + "messages": "hello messages", + "count": 10 +}' -v +curl --location 'http://localhost:7114/requests' \ +--header 'Content-Type: application/json' \ +--data '{ + "message": "hello messages", + "count": 10 +}' -v +``` ## Teardown diff --git a/http.kafka.sync/README.md b/http.kafka.sync/README.md index b1390731..294dc002 100644 --- a/http.kafka.sync/README.md +++ b/http.kafka.sync/README.md @@ -99,7 +99,7 @@ Verify the response response via the Kafka UI [items-responses](http://localhost ```text Key:Message | 6cf7a1d5-3772-49ef-86e7-ba6f2c7d7d0:{"greeting":"Hello, world Thu Sep 19 15:30:48 EDT 2024"} Headers | :status=200,zilla:correlation-id=1-f8f1c788ba786f691823098ee0505a1b - ``` + ``` ## Teardown diff --git a/mqtt.jwt/README.md b/mqtt.jwt/README.md index 8f980353..06006dbb 100644 --- a/mqtt.jwt/README.md +++ b/mqtt.jwt/README.md @@ -34,6 +34,7 @@ brew install mosquitto ### Verify behavior Connect a subscribing client to mosquitto broker to port `1883`. Using mosquitto_pub client publish `{"id":"1","status":"on"}` to Zilla on port `7183`. Verify that the message arrived to on the first client. + ```bash mosquitto_sub -V '5' -t 'smartylighting/streetlights/1/0/event/+/lighting/measured' -d ``` diff --git a/mqtt.jwt/zilla.yaml b/mqtt.jwt/zilla.yaml index 22ddbfb6..9ce3b1cf 100644 --- a/mqtt.jwt/zilla.yaml +++ b/mqtt.jwt/zilla.yaml @@ -23,9 +23,9 @@ bindings: port: - 7183 routes: - - when: - - port: 7183 - exit: north_mqtt_server + - when: + - port: 7183 + exit: north_mqtt_server north_mqtt_server: type: mqtt kind: server diff --git a/mqtt.kafka.broker/zilla.yaml b/mqtt.kafka.broker/zilla.yaml index 3009e25a..e5371a72 100644 --- a/mqtt.kafka.broker/zilla.yaml +++ b/mqtt.kafka.broker/zilla.yaml @@ -1,7 +1,6 @@ --- name: zilla-mqtt-kafka-broker bindings: - # Proxy service entrypoint north_tcp_server: type: tcp @@ -52,7 +51,7 @@ bindings: kind: client options: servers: - - ${{env.KAFKA_BOOTSTRAP_SERVER}} + - ${{env.KAFKA_BOOTSTRAP_SERVER}} exit: south_tcp_client south_tcp_client: type: tcp diff --git a/openapi.asyncapi.kakfa.proxy/http-openapi.yaml b/openapi.asyncapi.kakfa.proxy/http-openapi.yaml index 96068787..7ff25cf4 100644 --- a/openapi.asyncapi.kakfa.proxy/http-openapi.yaml +++ b/openapi.asyncapi.kakfa.proxy/http-openapi.yaml @@ -15,7 +15,7 @@ paths: tags: - pets responses: - '200': + "200": description: A paged array of pets content: application/json: @@ -39,7 +39,7 @@ paths: "$ref": "#/components/schemas/Pet" required: true responses: - '201': + "201": description: Null response default: description: unexpected error diff --git a/openapi.proxy/petstore-openapi.yaml b/openapi.proxy/petstore-openapi.yaml index e8e4e71c..ce312520 100644 --- a/openapi.proxy/petstore-openapi.yaml +++ b/openapi.proxy/petstore-openapi.yaml @@ -15,7 +15,7 @@ paths: tags: - pets responses: - '200': + "200": description: A paged array of pets content: application/json: @@ -39,7 +39,7 @@ paths: "$ref": "#/components/schemas/Pet" required: true responses: - '201': + "201": description: Null response default: description: unexpected error diff --git a/sse.jwt/README.md b/sse.jwt/README.md index 33d87f7e..ee85fe05 100644 --- a/sse.jwt/README.md +++ b/sse.jwt/README.md @@ -91,12 +91,12 @@ output: > user-agent: curl/7.79.1 > accept: */* > authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImV4YW1wbGUifQ.eyJhdWQiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbSIsImV4cCI6MTY2MTc5MDM1MCwiaXNzIjoiaHR0cHM6Ly9hdXRoLmV4YW1wbGUuY29tIiwic2NvcGUiOiJwcm94eTpzdHJlYW0iLCJzdWIiOiJleGFtcGxlIn0.XAugWfUFa-oU4Hx7Nn00zq9K9oTEkSknQvmiiAtJCRouIRXyl4qCAlQmOeI35JhN_RLj4p9EgoyCVtlZNWXKVcTeAxaAQrNeKywQ58wsn0VFdKHB2LXR0oxHXOtJIkl9oJWaM4IvUenKAfs2g-yHQtKNryhu9q8TgOPEW7JeqfCaV3J_xjn7WjMILggLde6lu8haGNa1ePDMxJwZ2Z9AQd-5Gcfyx9lQj_G7VQBHR5j8c5LrXx4U8E5f4KOYFUI7xs2wSuTApZyQdmetIRpFkIfsqVcH_rtdqs6ZuCTwmaKwXt-9KNvvg3n0joN1jqdtE7XhnW19-LQK62RgrEV6ZA -> +> * Connection state changed (MAX_CONCURRENT_STREAMS == 2147483647)! -< HTTP/2 200 +< HTTP/2 200 < content-type: text/event-stream < access-control-allow-origin: * -< +< data:Hello, world Wed Aug 29 9:05:52 PDT 2022 ```