Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use new authoritative OpenAPI rendering URLs #75

Merged
merged 1 commit into from
Dec 28, 2024
Merged
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
6 changes: 6 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ openapi-server-url-templating
Copyright 2024, Vladimír Gorej
openapi-server-url-templating is licensed under Apache 2.0 license.
Copy of the Apache 2.0 license can be found in `LICENSE` file.

OpenAPI Specification 3.1.x
Copyright The Linux Foundation
Fragments of the specification text are embedded in `README.md`.
Definition of `server-variable-name` ABNF non-terminal is based on the OpenAPI Specification ABNF.
Copy of the Apache 2.0 license can be found in `LICENSE` file.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@
[![try on RunKit](https://img.shields.io/badge/try%20on-RunKit-brightgreen.svg?style=flat)](https://npm.runkit.com/openapi-server-url-templating)
[![Tidelift](https://tidelift.com/badges/package/npm/openapi-server-url-templating)](https://tidelift.com/subscription/pkg/npm-openapi-server-url-templating?utm_source=npm-openapi-server-url-templating&utm_medium=referral&utm_campaign=readme)

[Server URL Templating](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object) supports [Server Variables](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-variable-object). Variable substitutions will be made when a variable is named in `{`brackets`}`.
[Server URL Templating](https://spec.openapis.org/oas/v3.1.1.html#server-object) supports [Server Variables](https://spec.openapis.org/oas/v3.1.1.html#server-variable-object). Variable substitutions will be made when a variable is named in `{`brackets`}`.

This mechanism is used by [Server Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object)
of [OpenAPI specification](https://github.com/OAI/OpenAPI-Specification).
This mechanism is used by [Server Object](https://spec.openapis.org/oas/v3.1.1.html#server-object)
of [OpenAPI specification](https://spec.openapis.org/).

`openapi-server-url-templating` is a **parser**, **validator** and **substitution mechanism** for OpenAPI Server URL Templating. It supports
Server Object URL Templating defined in following OpenAPI specification versions:
`openapi-server-url-templating` is a **parser**, **validator** and **substitution mechanism** for OpenAPI Server URL Templating,
which played a [foundational role](https://github.com/OAI/OpenAPI-Specification/pull/4264) in defining the official ANBF grammar for Server URL Templating.

- [OpenAPI 3.0.0](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#server-object)
- [OpenAPI 3.0.1](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.1.md#server-object)
- [OpenAPI 3.0.2](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#server-object)
- [OpenAPI 3.0.3](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#server-object)
- [OpenAPI 3.0.4](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-object)
- [OpenAPI 3.1.0](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object)
- [OpenAPI 3.1.1](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#server-object)
It supports Server Object URL Templating defined in following OpenAPI specification versions:

- [OpenAPI 3.0.0](https://spec.openapis.org/oas/v3.0.0.html)
- [OpenAPI 3.0.1](https://spec.openapis.org/oas/v3.0.1.html)
- [OpenAPI 3.0.2](https://spec.openapis.org/oas/v3.0.2.html)
- [OpenAPI 3.0.3](https://spec.openapis.org/oas/v3.0.3.html)
- [OpenAPI 3.0.4](https://spec.openapis.org/oas/v3.0.4.html)
- [OpenAPI 3.1.0](https://spec.openapis.org/oas/v3.1.0.html)
- [OpenAPI 3.1.1](https://spec.openapis.org/oas/v3.1.1.html)

<table>
<tr>
Expand Down Expand Up @@ -207,7 +209,7 @@ test('https://gigantic-server.com/base-path', { strict: true }); // => false (do

#### Substitution

Substituting a Server URL Templating is as simple as importing the **substitute** function and calling it.
Performing Server URL template substitution is as simple as importing the **substitute** function and calling it.

```js
import { substitute } from 'openapi-server-url-templating';
Expand Down
Loading