|
6 | 6 | |--|--|
|
7 | 7 | |Models and Writers|[](https://www.nuget.org/packages/Microsoft.OpenApi/) |
|
8 | 8 | |Readers | [](https://www.nuget.org/packages/Microsoft.OpenApi.Readers/) |
|
| 9 | +|Hidi|[](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi/) |
9 | 10 |
|
10 | 11 |
|
11 | 12 | The **OpenAPI.NET** SDK contains a useful object model for OpenAPI documents in .NET along with common serializers to extract raw OpenAPI JSON and YAML documents from the model.
|
@@ -90,6 +91,28 @@ var outputString = openApiDocument.Serialize(OpenApiSpecVersion.OpenApi2_0, Open
|
90 | 91 |
|
91 | 92 | ```
|
92 | 93 |
|
| 94 | +# Validating/Testing OpenAPI descriptions |
| 95 | +In order to test the validity of an OpenApi document, we avail the following tools: |
| 96 | +- [Microsoft.OpenApi.Hidi](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi) |
| 97 | + |
| 98 | + A commandline tool for validating and transforming OpenAPI descriptions. [Installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET/blob/vnext/src/Microsoft.OpenApi.Hidi/readme.md) |
| 99 | + |
| 100 | +- Microsoft.OpenApi.Workbench |
| 101 | + |
| 102 | + A workbench tool consisting of a GUI where you can test and convert OpenAPI descriptions in both JSON and YAML from v2-->v3 and vice versa. |
| 103 | + |
| 104 | + #### Installation guidelines: |
| 105 | + 1. Clone the repo locally by running this command: |
| 106 | + `git clone https://github.com/microsoft/OpenAPI.NET.git` |
| 107 | + 2. Open the solution file `(.sln)` in the root of the project with Visual Studio |
| 108 | + 3. Navigate to the `src/Microsoft.OpenApi.Workbench` directory and set it as the startup project |
| 109 | + 4. Run the project and you'll see a GUI pop up resembling the one below: |
| 110 | + |
| 111 | + |
| 112 | + <img src="https://user-images.githubusercontent.com/36787645/235884441-f45d2ef7-c27b-4e1a-a890-d6f7fbef87c3.png" width="700" height="500"> |
| 113 | + |
| 114 | + 5. Copy and paste your OpenAPI descriptions in the **Input Content** window or paste the path to the descriptions file in the **Input File** textbox and click on `Convert` to render the results. |
| 115 | + |
93 | 116 | # Build Status
|
94 | 117 |
|
95 | 118 | |**master**|
|
|
0 commit comments