@@ -31,115 +31,6 @@ designing great APIs.*
3131> All schemas target JSON Schema 2020-12, the dialect used by OpenAPI v3.1 and
3232> later. Earlier JSON Schema dialects will be supported in the future.
3333
34- ## :bookmark_tabs : Table of Contents
35-
36- - [ :rocket : Getting Started] ( #rocket-getting-started )
37- - [ From Sourcemeta Schemas] ( #from-sourcemeta-schemas )
38- - [ From GitHub Releases] ( #from-github-releases )
39- - [ Using Git Submodules] ( #using-git-submodules )
40- - [ Using Vendorpull] ( #using-vendorpull )
41- - [ :mortar_board : Citing] ( #mortar_board-citing )
42- - [ :page_facing_up : License] ( #page_facing_up-license )
43- - [ :handshake : Contributing] ( #handshake-contributing )
44- - [ :email : Contact] ( #email-contact )
45-
46- ## :rocket : Getting Started
47-
48- While you can always copy-paste schemas directly, here are more convenient and
49- maintainable ways to consume them.
50-
51- ### From Sourcemeta Schemas
52-
53- We periodically publish the JSON Schema standard library to [ Sourcemeta
54- Schemas] ( https://schemas.sourcemeta.com/sourcemeta/std ) , our free service for
55- hosting open-source schemas. Each schema gets a unique HTTPS URL that you can
56- directly reference from your OpenAPI specifications using the
57- [ ` $ref ` ] ( https://www.learnjsonschema.com/2020-12/core/ref ) keyword. For
58- example:
59-
60- ``` yaml
61- schema :
62- type : object
63- properties :
64- email :
65- $ref : ' https://schemas.sourcemeta.com/sourcemeta/std/<version>/ietf/email/address'
66- ` ` `
67-
68- To de-reference and embed these external URLs when distributing your OpenAPI
69- specification, use standard tools like [` redocly
70- bundle`](https://redocly.com/docs/cli/commands/bundle).
71-
72- # ## From GitHub Releases
73-
74- We publish archives of the JSON Schema standard library to [GitHub
75- Releases](https://github.com/sourcemeta/std/releases). Download and extract an
76- archive to your preferred location, then reference the JSON files from your
77- OpenAPI specifications using the
78- [`$ref`](https://www.learnjsonschema.com/2020-12/core/ref) keyword with a
79- relative path. For example :
80-
81- ` ` ` yaml
82- schema:
83- type: object
84- properties:
85- email:
86- $ref: "../path/to/sourcemeta-std/ietf/email/address.json"
87- ` ` `
88-
89- # ## Using Git Submodules
90-
91- If your OpenAPI specification lives in a Git repository, you can add this
92- library as a [git
93- submodule](https://git-scm.com/docs/git-submodule). This approach keeps the
94- schemas versioned alongside your code and ensures consistent access across your
95- team. Add the submodule to your repository :
96-
97- ` ` ` sh
98- git submodule add https://github.com/sourcemeta/std std
99- ` ` `
100-
101- Then reference the schemas using the
102- [`$ref`](https://www.learnjsonschema.com/2020-12/core/ref) keyword with a
103- relative path. For example :
104-
105- ` ` ` yaml
106- schema:
107- type: object
108- properties:
109- email:
110- $ref: './std/schemas/ietf/email/address.json'
111- ` ` `
112-
113- # ## Using Vendorpull
114-
115- [Vendorpull](https://github.com/sourcemeta/vendorpull) is our tool for
116- vendoring Git repositories, which we use across our projects. It provides an
117- easier alternative to submodules by committing upstream contents directly into
118- your repository while letting you easily manage and update them. Add this line
119- to your `DEPENDENCIES` file :
120-
121- ` ` `
122- std https://github.com/sourcemeta/std v<x.y.z>
123- ` ` `
124-
125- Then pull the library into your `vendor` directory :
126-
127- ` ` ` sh
128- ./vendor/vendorpull/pull std
129- ` ` `
130-
131- Reference the schemas using the
132- [`$ref`](https://www.learnjsonschema.com/2020-12/core/ref) keyword with a
133- relative path. For example :
134-
135- ` ` ` yaml
136- schema:
137- type: object
138- properties:
139- email:
140- $ref: './vendor/std/schemas/ietf/email/address.json'
141- ` ` `
142-
14334## :mortar_board : Citing
14435
14536If you use this library in your research or project, please cite it using the
0 commit comments