Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/fix-server-object-title-summary-1137.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions packages/parser/src/spec-types/v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export interface ServerObject extends SpecificationExtensions {
pathname?: string;
protocolVersion?: string;
description?: string;
title?: string;
summary?: string;
variables?: Record<string, ServerVariableObject | ReferenceObject>;
security?: Array<SecuritySchemeObject | ReferenceObject>;
tags?: TagsObject;
Expand Down
Loading