Skip to content

Commit 41abd45

Browse files
committed
test(license): add demo test spec for SPDX identifier support
Adds licenseIdentifier.yaml to demo/examples/tests to verify that a spec using license.identifier renders a clickable SPDX license link correctly. Related to #1319
1 parent ab9c580 commit 41abd45

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
openapi: 3.1.0
2+
info:
3+
title: License Identifier Demo API
4+
description: |
5+
Demonstrates OAS v3.1.0 `license.identifier` support (SPDX expression).
6+
7+
Per the OAS v3.1.0 spec, `identifier` and `url` are mutually exclusive.
8+
When `identifier` is present, a link to the canonical SPDX license page
9+
should be rendered in the License section.
10+
version: 1.0.0
11+
license:
12+
name: Apache 2.0
13+
identifier: Apache-2.0
14+
tags:
15+
- name: licenseIdentifier
16+
description: License identifier tests
17+
paths:
18+
/license-identifier:
19+
get:
20+
tags:
21+
- licenseIdentifier
22+
summary: License rendered via SPDX identifier
23+
description: |
24+
This endpoint exists to verify that a spec using `license.identifier`
25+
(instead of `license.url`) correctly renders a clickable license link
26+
pointing to `https://spdx.org/licenses/Apache-2.0.html`.
27+
responses:
28+
"204":
29+
description: No content

0 commit comments

Comments
 (0)