diff --git a/.changeset/fix-server-object-title-summary-1137.md b/.changeset/fix-server-object-title-summary-1137.md new file mode 100644 index 000000000..d02d52a08 --- /dev/null +++ b/.changeset/fix-server-object-title-summary-1137.md @@ -0,0 +1,14 @@ +--- +"@asyncapi/parser": patch +--- + +fix(parser): add missing `title` and `summary` fields to v3 ServerObject type + +AsyncAPI 3.0 spec allows `title` and `summary` on the Server Object (see +https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverObject), +but the parser's TypeScript types omitted them. This meant users could not +type-safely access `server.title` / `server.summary` even though the +runtime model methods (`server.title()`, `server.hasTitle()`, etc., +provided by `CoreModel`) already supported them. + +Fixes #1137 diff --git a/packages/parser/src/spec-types/v3.ts b/packages/parser/src/spec-types/v3.ts index 766df3bf9..69aaccd38 100644 --- a/packages/parser/src/spec-types/v3.ts +++ b/packages/parser/src/spec-types/v3.ts @@ -45,6 +45,8 @@ export interface ServerObject extends SpecificationExtensions { pathname?: string; protocolVersion?: string; description?: string; + title?: string; + summary?: string; variables?: Record; security?: Array; tags?: TagsObject;