|
1 | 1 | [](https://travis-ci.org/googleapis/gnostic)
|
2 | 2 |
|
3 |
| -# gnostic |
| 3 | +# ⨁ gnostic |
| 4 | + |
| 5 | +This repository contains a Go command line tool which converts |
| 6 | +JSON and YAML [OpenAPI](https://github.com/OAI/OpenAPI-Specification) |
| 7 | +descriptions to and from equivalent Protocol Buffer representations. |
4 | 8 |
|
5 |
| -This repository contains a Go command line tool which reads |
6 |
| -[OpenAPI](https://github.com/OAI/OpenAPI-Specification) |
7 |
| -descriptions in JSON or YAML formats and writes |
8 |
| -equivalent Protocol Buffer representations. |
9 | 9 | [Protocol Buffers](https://developers.google.com/protocol-buffers/)
|
10 |
| -are a language-neutral, platform-neutral extensible mechanism |
| 10 | +provide a language-neutral, platform-neutral, extensible mechanism |
11 | 11 | for serializing structured data.
|
12 |
| - |
13 |
| -**gnostic** reads OpenAPI descriptions into |
14 |
| -Protocol Buffer representations, reports errors, |
15 |
| -resolves internal dependencies, and writes the results |
16 |
| -in a binary form that can be used in any language that is |
| 12 | +**gnostic**'s Protocol Buffer models for the OpenAPI Specification |
| 13 | +can be used to generate code that includes data structures with |
| 14 | +explicit fields for the elements of an OpenAPI description. |
| 15 | +This makes it possible for developers to work with OpenAPI |
| 16 | +descriptions in type-safe ways, which is particularly useful |
| 17 | +in strongly-typed languages like Go and Swift. |
| 18 | + |
| 19 | +**gnostic** reads OpenAPI descriptions into |
| 20 | +these generated data structures, reports errors, |
| 21 | +resolves internal dependencies, and writes the results |
| 22 | +in a binary form that can be used in any language that is |
17 | 23 | supported by the Protocol Buffer tools.
|
| 24 | +A plugin interface simplifies integration with API |
| 25 | +tools written in a variety of different languages, |
| 26 | +and when necessary, Protocol Buffer OpenAPI descriptions |
| 27 | +can be reexported as JSON or YAML. |
18 | 28 |
|
19 |
| -Code generated by the Protocol Buffer tools includes data |
20 |
| -structures with explicit fields for the elements of an OpenAPI |
21 |
| -description. This makes it possible for developers to work |
22 |
| -with OpenAPI descriptions in type-safe ways. This is |
23 |
| -particularly useful in strongly-typed languages like |
24 |
| -Go and Swift. |
25 |
| - |
26 |
| -**gnostic** compilation code and the OpenAPI Protocol Buffer |
27 |
| -representation are automatically generated from the |
| 29 | +**gnostic** compilation code and OpenAPI Protocol Buffer |
| 30 | +models are automatically generated from an |
28 | 31 | [OpenAPI JSON Schema](https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json).
|
29 | 32 | Source code for the generator is in the [generate-gnostic](generate-gnostic) directory.
|
30 | 33 |
|
@@ -56,7 +59,7 @@ buffers. Pre-generated versions of these files are in the OpenAPIv2 directory.
|
56 | 59 | cd ..
|
57 | 60 | generate-gnostic --v2
|
58 | 61 |
|
59 |
| -3. [Optional] Generate protocol buffer support code. |
| 62 | +3. [Optional] Generate Protocol Buffer support code. |
60 | 63 | A pre-generated version of this file is checked into the OpenAPIv2 directory.
|
61 | 64 | This step requires a local installation of protoc, the Protocol Buffer Compiler.
|
62 | 65 | You can get protoc [here](https://github.com/google/protobuf).
|
|
0 commit comments