You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.specification.md
+15-23Lines changed: 15 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,9 +41,7 @@ $ make install
41
41
You can install some pre-commit hooks to ensure you can't commit invalid spec changes by accident. These are also run
42
42
in CI, but it's useful to run them locally too.
43
43
44
-
```
45
-
$ make install-hooks
46
-
```
44
+
Note that this step is now done automatically in `make install` above. `make install-hooks` is no longer run.
47
45
48
46
### Environment Variables
49
47
@@ -56,8 +54,20 @@ Various scripts and commands rely on environment variables being set. These are
56
54
There are `make` commands that alias some of this functionality:
57
55
58
56
-`lint` -- Lints the spec and code
59
-
-`publish` -- Outputs the specification as a **single file** into the `build/` directory
60
-
-`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
58
+
59
+
### Modifying the OAS file
60
+
61
+
Note that the master OAS file is now the **YAML** version, as it is far easier to maintain than the JSON.
62
+
63
+
To review your modifications, use Swagger Editor (https://editor.swagger.io).
64
+
65
+
### Update the OAS file to the public website
66
+
67
+
Note that this is currently a **manual** process.
68
+
69
+
After modifying the OAS YAML file, run `make oas` on your local machine. This will output the specification into `oas/immunisation-fhir-api.json`. This is a **minified** JSON file suitable for sending to APIM
70
+
for uploading to the pubic website.
61
71
62
72
### Testing
63
73
@@ -72,26 +82,8 @@ Each API and team is unique. We encourage you to use a `test/` folder in the roo
72
82
73
83
-[**openapi-yaml-mode**](https://github.com/esc-emacs/openapi-yaml-mode) provides syntax highlighting, completion, and path help
74
84
75
-
### Speccy
76
-
77
-
> [Speccy](http://speccy.io/)_A handy toolkit for OpenAPI, with a linter to enforce quality rules, documentation rendering, and resolution._
78
-
79
-
Speccy does the lifting for the following npm scripts:
80
-
81
-
-`test` -- Lints the definition
82
-
-`publish` -- Outputs the specification as a **single file** into the `build/` directory
83
-
-`serve` -- Serves a preview of the specification in human-readable format
84
-
85
-
(Workflow detailed in a [post](https://developerjack.com/blog/2018/maintaining-large-design-first-api-specs/) on the _developerjack_ blog.)
86
-
87
-
:bulb: The `publish` command is useful when uploading to Apigee which requires the spec as a single file.
88
-
89
85
### Caveats
90
86
91
-
#### Swagger UI
92
-
93
-
Swagger UI unfortunately doesn't correctly render `$ref`s in examples, so use `speccy serve` instead.
94
-
95
87
#### Apigee Portal
96
88
97
89
The Apigee portal will not automatically pull examples from schemas, you must specify them manually.
0 commit comments