Skip to content

Commit 85fe617

Browse files
authored
Merge branch 'main' into overlay110
2 parents 9a3b178 + a8b8f72 commit 85fe617

1 file changed

Lines changed: 40 additions & 37 deletions

File tree

readme.md

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ output cleanly indented JSON or YAML.
1313
Additional features include powerful filtering options based on flags, tags, methods, operationIDs, and even unused components.
1414
To quickly standardize OpenAPI documents there is support for generating the operationIds and apply casing rules for consistency.
1515

16-
The CLI can split large OpenAPI documents into modular, multi-file structures for easier management.
16+
The CLI can split large OpenAPI documents into modular, multi-file structures for easier management.
1717
For upgrades, the openapi-format CLI offers the option to convert an OpenAPI 3.0 or 3.1 document to OpenAPI 3.1 or 3.2.
1818

1919
With the newly added OpenAPI Overlay support, users can overlay changes onto existing OpenAPI documents, to extend and customize the OpenAPI document.
@@ -93,19 +93,22 @@ Postman collections, test suites, ...
9393
- [x] Support for OpenAPI 3.0
9494
- [x] Support for OpenAPI 3.1
9595
- [x] Support for OpenAPI 3.2
96-
- [x] Online playground (https://openapi-format-playground.vercel.app/)
96+
- [x] Online playground ([playground.openapi-format.com](https://playground.openapi-format.com/))
9797

9898
## Online playground
9999

100-
The [OpenAPI-Format Playground](https://openapi-format-playground.vercel.app/) is a web-based tool for formatting and sorting OpenAPI documents, powered by the openapi-format CLI.
100+
The [OpenAPI-Format Playground](https://playground.openapi-format.com/) is a web-based tool for formatting, sorting, filtering, previewing, and comparing OpenAPI documents, powered by the `openapi-format` CLI.
101101

102-
<a href="https://openapi-format-playground.vercel.app/" target="_blank" title="OpenAPI-format Playground" rel="nofollow">
103-
<img src="https://raw.githubusercontent.com/thim81/openapi-format/main/assets/openapi-format-playground.png" alt="OpenAPI-format Playground" width="50%"><br>
104-
<img src="https://raw.githubusercontent.com/thim81/openapi-format/main/assets/openapi-format-playground-diff.png" alt="OpenAPI-format Playground Diff viewer" width="25%">
105-
<img src="https://raw.githubusercontent.com/thim81/openapi-format/main/assets/openapi-format-playground-filter.png" alt="OpenAPI-format Playground Filter UI" width="25%">
102+
You can also explore the website at [openapi-format.com](https://openapi-format.com/).
103+
104+
<a href="https://playground.openapi-format.com/" target="_blank" title="OpenAPI-format Playground" rel="nofollow">
105+
<img src="https://openapi-format.com/screenshots/openapi-format-playground-code-view.png" alt="OpenAPI-format Playground code view" width="76%"><br>
106+
<img src="https://openapi-format.com/screenshots/openapi-format-playground-preview-view.png" alt="OpenAPI-format Playground preview view" width="25%">
107+
<img src="https://openapi-format.com/screenshots/openapi-format-playground-diff-view.png" alt="OpenAPI-format Playground diff view" width="25%">
108+
<img src="https://openapi-format.com/screenshots/openapi-format-playground-overlay-actions.png" alt="OpenAPI-format Playground overlay actions" width="25%">
106109
</a>
107110

108-
More info about the features and usage, can be found in the [readme](https://github.com/thim81/openapi-format-playground?tab=readme-ov-file#features).
111+
More info about the playground features and usage can be found on the [website](https://openapi-format.com/).
109112

110113
## Installation
111114

@@ -329,7 +332,7 @@ paths:
329332
### Filter - tags
330333
331334
=> **tags**: Refers to the "tags" field from the "Operation
332-
Object" https://spec.openapis.org/oas/v3.0.3.html#operationObject
335+
Object" https://spec.openapis.org/oas/v3.0.3.html#operationObject
333336
334337
This will remove all fields and attached fields that match the tags. In the example below, this would mean that all
335338
items with the tags `pet` or `user` would be removed from the OpenAPI document.
@@ -1031,7 +1034,7 @@ $ openapi-format https://raw.githubusercontent.com/OAI/OpenAPI-Specification/mai
10311034
$ openapi-format openapi.json -o openapi.yaml
10321035
```
10331036

1034-
- Format an OpenAPI document using a configuration file containing all the options that would otherwise be passed via the CLI.
1037+
- Format an OpenAPI document using a configuration file containing all the options that would otherwise be passed via the CLI.
10351038

10361039
```shell
10371040
$ openapi-format openapi.yaml --configFile openapi-format-options.json
@@ -1233,7 +1236,7 @@ actions:
12331236
from: "$.info.version"
12341237
```
12351238

1236-
Fore more information about the OpenAPI Overlay options, see [OpenAPI Overlay Specification 1.1.0](https://spec.openapis.org/overlay/v1.1.0.html).
1239+
For more information about the OpenAPI Overlay options, see [OpenAPI Overlay Specification 1.1.0](https://spec.openapis.org/overlay/v1.1.0.html).
12371240

12381241
Use the `--overlayFile` option to specify the overlay file and apply it to your OpenAPI document.
12391242

@@ -1378,7 +1381,7 @@ Example: Splitting the Document
13781381
$ openapi-format openapi.json -o ./openapi-split/openapi.yaml --split
13791382
```
13801383

1381-
This command will take the openapi.json and split it into multiple files, stored under the ./openapi-split/ directory.
1384+
This command will take the openapi.json and split it into multiple files, stored under the ./openapi-split/ directory.
13821385

13831386
The resulting structure might look like this:
13841387

@@ -1400,7 +1403,7 @@ The main openapi.yaml file will contain references to these newly created files
14001403

14011404
### Bundling the OpenAPI Document
14021405

1403-
The `--no-bundle` option allows you to control whether local and remote $ref references are bundled into the final document.
1406+
The `--no-bundle` option allows you to control whether local and remote $ref references are bundled into the final document.
14041407

14051408
By default, all $ref references are dereferenced, resulting in a single, self-contained OpenAPI file. However, in some cases, you might prefer to keep the $ref references intact, especially if you're working with external references or want to maintain a modular structure.
14061409

@@ -1537,42 +1540,42 @@ You can either pass the settings inline or reference an external file using the
15371540

15381541
- **sortSet** / **sortFile**: Sort the fields in the OpenAPI document based on the order defined in the sort settings.
15391542

1540-
- Inline: Pass the sort order directly using sortSet in the config file.
1541-
- File: Use sortFile to specify the path to a local or remote JSON/YAML file containing custom sorting rules.
1543+
- Inline: Pass the sort order directly using sortSet in the config file.
1544+
- File: Use sortFile to specify the path to a local or remote JSON/YAML file containing custom sorting rules.
15421545

15431546
- **casingSet** / **casingFile**: Define the casing convention for operationId, parameters, properties, etc.
15441547

1545-
- Inline:
1546-
```json
1547-
"casingSet": {
1548-
"operationId": "camelCase",
1549-
"properties": "PascalCase"
1550-
}
1551-
```
1548+
- Inline:
1549+
```json
1550+
"casingSet": {
1551+
"operationId": "camelCase",
1552+
"properties": "PascalCase"
1553+
}
1554+
```
15521555

1553-
- File: Use casingFile to specify the path to a local or remote JSON/YAML file containing casing rules.
1556+
- File: Use casingFile to specify the path to a local or remote JSON/YAML file containing casing rules.
15541557

15551558
- **filterSet** / **filterFile**: Filter out specific tags, paths, or components from the OpenAPI document.
15561559

1557-
- Inline:
1558-
```json
1559-
"filterSet": {
1560-
"tags": ["internal", "beta"]
1561-
}
1562-
```
1560+
- Inline:
1561+
```json
1562+
"filterSet": {
1563+
"tags": ["internal", "beta"]
1564+
}
1565+
```
15631566

1564-
- File: Use filterFile to specify the path to a local or remote JSON/YAML file containing filter rules.
1567+
- File: Use filterFile to specify the path to a local or remote JSON/YAML file containing filter rules.
15651568

15661569
- **generateSet** / **generateFile**: Automatically generate operationId, summary, and other elements based on predefined templates.
15671570

1568-
- Inline:
1569-
```json
1570-
"generateSet": {
1571-
"operationIdTemplate": "<method>_<pathPart2>_Handler"
1572-
}
1573-
```
1571+
- Inline:
1572+
```json
1573+
"generateSet": {
1574+
"operationIdTemplate": "<method>_<pathPart2>_Handler"
1575+
}
1576+
```
15741577

1575-
- File: Use generateFile to specify the path to a local or remote JSON/YAML file containing generate rules.
1578+
- File: Use generateFile to specify the path to a local or remote JSON/YAML file containing generate rules.
15761579

15771580

15781581
### Using .openapiformatrc

0 commit comments

Comments
 (0)