Skip to content

Add support for OpenAPI license.identifier field#11302

Open
glecaros wants to merge 2 commits into
mainfrom
glecaros/openapi-license
Open

Add support for OpenAPI license.identifier field#11302
glecaros wants to merge 2 commits into
mainfrom
glecaros/openapi-license

Conversation

@glecaros

Copy link
Copy Markdown
Member

The License model now supports an identifier field (SPDX license expression) alongside name and url, per the OpenAPI 3.1 spec. identifier and url are mutually exclusive; the @info decorator now reports a diagnostic if both are specified.

closes #11301

The License model now supports an `identifier` field (SPDX license
expression) alongside `name` and `url`, per the OpenAPI 3.1 spec.
`identifier` and `url` are mutually exclusive; the `@info` decorator
now reports a diagnostic if both are specified.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Jul 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/openapi@11302
npm i https://pkg.pr.new/@typespec/openapi3@11302

commit: 209f54d

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/openapi
Show changes

@typespec/openapi - feature ✏️

Add support for the OpenAPI info.license.identifier field (an SPDX license expression) on the License model used with @info. The identifier and url fields are mutually exclusive; specifying both now results in a diagnostic.,> ,> tsp,> @info(#{,> license: #{,> name: "Apache 2.0",,> identifier: "Apache-2.0",,> },,> }),>

@azure-sdk-automation

azure-sdk-automation Bot commented Jul 17, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the meta:website TypeSpec.io updates label Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:openapi3 Issues for @typespec/openapi3 emitter lib:openapi meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: OpenAPI library is missing the info.license.identifier field.

1 participant