Skip to content

Slides and example files for talk about REST vs. Event-Driven Architecture.

Notifications You must be signed in to change notification settings

manuelottlik/rest-vs-eda-talk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rest-vs-eda-talk

Slides and example files for talk about REST vs. Event-Driven Architecture.

Content

You got your room schema:

type: object
required:
- number
- bookable
properties:
number:
    type: string
    description: room number
    example: "A 1.02"
    minLength: 0
    maxLength: 20
name:
    type: string
    description: name of the room
    example: Conference room
    minLength: 2
    maxLength: 255
bookable:
    type: boolean
    description: wether this room can be booked or not
    example: true

Then you got your OpenAPI:

openapi: "3.0.0"
# ...
paths:
  /rooms/{roomId}:
    parameters:
      - $ref: "#/components/parameters/RoomId"
    get:
      # ...
      responses:
        "200":
          $ref: "#/components/responses/Room"
components:
  # ...
  schemas:
    Room:
      $ref: "schemas.yaml#/components/schemas/Room"

And your AsyncAPI:

asyncapi: "2.0.0"
# ...
channels:
  evt.rooms.created:
    subscribe:
      summary: "An room was created."
      message:
        $ref: "#/components/messages/RoomCreated"
components:
    # ...
  schemas:
    RoomCloudEvent:
      allOf:
        - $ref: "defaults.yaml#/components/schemas/DefaultCloudEvent"
        - type: object
          properties:
            data:
              $ref: "schemas.yaml#/components/schemas/Room"

About

Slides and example files for talk about REST vs. Event-Driven Architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published