Skip to content

Commit 22d00b7

Browse files
committed
README
1 parent 955b27c commit 22d00b7

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

README.specification.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,41 +54,40 @@ Various scripts and commands rely on environment variables being set. These are
5454
There are `make` commands that alias some of this functionality:
5555

5656
- `lint` -- Lints the spec and code
57-
- `publish` -- Outputs the specification as a **single file** into the `build/` directory
58-
- `serve` -- Serves a preview of the specification in human-readable format
57+
- `publish` -- Outputs the specification as a **single** JSON file into the `build/` directory
5958

60-
### Testing
59+
Note: the npm scripts are no longer based on Speccy.
6160

62-
Each API and team is unique. We encourage you to use a `test/` folder in the root of the project, and use whatever testing frameworks or apps your team feels comfortable with. It is important that the URL your test points to be configurable. We have included some stubs in the Makefile for running tests.
61+
### Modifying the OAS file
6362

64-
### VS Code Plugins
63+
Note that the master OAS file is now the **YAML** version, as it is far easier to maintain than the JSON.
6564

66-
- [openapi-lint](https://marketplace.visualstudio.com/items?itemName=mermade.openapi-lint) resolves links and validates entire spec with the 'OpenAPI Resolve and Validate' command
67-
- [OpenAPI (Swagger) Editor](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi) provides sidebar navigation
65+
To review your modifications, use Swagger Editor (https://editor.swagger.io).
6866

69-
### Emacs Plugins
67+
### Update the OAS file to the public website
7068

71-
- [**openapi-yaml-mode**](https://github.com/esc-emacs/openapi-yaml-mode) provides syntax highlighting, completion, and path help
69+
Note that this is currently a **manual** process.
7270

73-
### Speccy
71+
After modifying the OAS YAML file, run `make oas` on your local machine. This will output the specification into `specification/immunisation-fhir-api.oas.json`. This is a **minified, versioned** JSON file suitable for sending to APIM
72+
for uploading to the pubic website.
7473

75-
> [Speccy](http://speccy.io/) _A handy toolkit for OpenAPI, with a linter to enforce quality rules, documentation rendering, and resolution._
74+
Please push the minified JSON file to GitHub to along with the YAML file to keep the two in sync, and so that the JSON file can be
75+
re-submitted to APIM without re-processing if need be.
7676

77-
Speccy does the lifting for the following npm scripts:
77+
### Testing
7878

79-
- `test` -- Lints the definition
80-
- `publish` -- Outputs the specification as a **single file** into the `build/` directory
81-
- `serve` -- Serves a preview of the specification in human-readable format
79+
Each API and team is unique. We encourage you to use a `test/` folder in the root of the project, and use whatever testing frameworks or apps your team feels comfortable with. It is important that the URL your test points to be configurable. We have included some stubs in the Makefile for running tests.
8280

83-
(Workflow detailed in a [post](https://developerjack.com/blog/2018/maintaining-large-design-first-api-specs/) on the _developerjack_ blog.)
81+
### VS Code Plugins
8482

85-
:bulb: The `publish` command is useful when uploading to Apigee which requires the spec as a single file.
83+
- [openapi-lint](https://marketplace.visualstudio.com/items?itemName=mermade.openapi-lint) resolves links and validates entire spec with the 'OpenAPI Resolve and Validate' command
84+
- [OpenAPI (Swagger) Editor](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi) provides sidebar navigation
8685

87-
### Caveats
86+
### Emacs Plugins
8887

89-
#### Swagger UI
88+
- [**openapi-yaml-mode**](https://github.com/esc-emacs/openapi-yaml-mode) provides syntax highlighting, completion, and path help
9089

91-
Swagger UI unfortunately doesn't correctly render `$ref`s in examples, so use `speccy serve` instead.
90+
### Caveats
9291

9392
#### Apigee Portal
9493

0 commit comments

Comments
 (0)