Skip to content

Conversation

@gasolima
Copy link
Contributor

@gasolima gasolima commented Nov 7, 2025

Fixes #

EventBridge Schema example

{
  "$metadata": {
    "httpStatusCode": 200,
    "requestId": "3892a1fc-01ba-4074-b237-9c5d35e96a58",
    "attempts": 1,
    "totalRetryDelay": 0
  },
  "Content": {
    "openapi": "3.0.0",
    "info": {
      "version": "1.0.0",
      "title": "AlexaForBusinessRoomStateChange"
    },
    "paths": {},
    "components": {
      "schemas": {
        "AWSEvent": {
          "type": "object",
          "required": [
            "detail-type",
            "resources",
            "detail",
            "id",
            "source",
            "time",
            "region",
            "account"
          ],
          "x-amazon-events-detail-type": "Alexa for Business Room State Change",
          "x-amazon-events-source": "aws.a4b",
          "properties": {
            "detail": {
              "$ref": "#/components/schemas/RoomStateChange"
            },
            "account": {
              "type": "string"
            },
            "detail-type": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "region": {
              "type": "string"
            },
            "resources": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "source": {
              "type": "string"
            },
            "time": {
              "type": "string",
              "format": "date-time"
            }
          }
        },
        "RoomStateChange": {
          "type": "object",
          "required": [
            "mode",
            "calendar-event",
            "event-type",
            "version"
          ],
          "properties": {
            "calendar-event": {
              "$ref": "#/components/schemas/Calendar-event"
            },
            "event-type": {
              "type": "string"
            },
            "mode": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          }
        },
        "Calendar-event": {
          "type": "object",
          "required": [
            "profileArn",
            "calendarId",
            "provider",
            "startTime",
            "endTime",
            "id",
            "roomArn"
          ],
          "properties": {
            "calendarId": {
              "type": "string"
            },
            "checkInTime": {
              "type": "string",
              "format": "date-time"
            },
            "endTime": {
              "type": "string",
              "format": "date-time"
            },
            "id": {
              "type": "string"
            },
            "profileArn": {
              "type": "string"
            },
            "provider": {
              "type": "string"
            },
            "releaseTime": {
              "type": "string",
              "format": "date-time"
            },
            "roomArn": {
              "type": "string"
            },
            "startTime": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      }
    }
  },
  "Description": "Schema for event type RoomStateChange, published by AWS service aws.a4b",
  "LastModified": "2025-07-15T16:05:37.000Z",
  "SchemaArn": "",
  "SchemaName": "aws.a4b@RoomStateChange",
  "SchemaVersion": "3",
  "Tags": {},
  "Type": "OpenApi3",
  "VersionCreatedDate": "2025-07-15T16:05:37.000Z"
}

function loadEventBridgeSchemaDirectory(
baseDir: string,
): (directory: string, options: EventBridgeSchemaSourceOptions) => Promise<EventBridgeSchema[]> {
console.log('SOMETHING WORKING....');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be deleted later, it's just to unblock other ppl to work on codegen, and to get general feedback that what i'm doing matching ur expectations

//
// export type HasEvent = Relationship<Resource, Event>;

export class SpecBuilder {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do a bit more specific name?

'x-amazon-events-source': string;
properties: {
detail: {
$ref: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Is this JSON Schema yet again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants