Skip to content

Commit

Permalink
Update to 2.0.0-preview.6
Browse files Browse the repository at this point in the history
  • Loading branch information
captainsafia committed Jan 13, 2025
1 parent 76122ef commit b2c5885
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 65 deletions.
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@
<XunitExtensibilityExecutionVersion>$(XunitVersion)</XunitExtensibilityExecutionVersion>
<XUnitRunnerVisualStudioVersion>2.8.2</XUnitRunnerVisualStudioVersion>
<MicrosoftDataSqlClientVersion>5.2.2</MicrosoftDataSqlClientVersion>
<MicrosoftOpenApiVersion>2.0.0-preview2</MicrosoftOpenApiVersion>
<MicrosoftOpenApiReadersVersion>2.0.0-preview2</MicrosoftOpenApiReadersVersion>
<MicrosoftOpenApiVersion>2.0.0-preview4</MicrosoftOpenApiVersion>
<MicrosoftOpenApiReadersVersion>2.0.0-preview4</MicrosoftOpenApiReadersVersion>
<!-- dotnet tool versions (see also auto-updated DotnetEfVersion property). -->
<DotnetDumpVersion>6.0.322601</DotnetDumpVersion>
<DotnetServeVersion>1.10.93</DotnetServeVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext
{
if (Uri.TryCreate(configuration["DocumentationBaseUrl"], UriKind.Absolute, out var baseUri))
{
var url = new Uri(baseUri, $"/api/docs/schemas/{Uri.EscapeDataString(schema.Type.ToString()!)}");
var url = new Uri(baseUri, $"/api/docs/schemas/{Uri.EscapeDataString(schema.Type.ToString()!.ToLowerInvariant())}");

schema.ExternalDocs = new OpenApiExternalDocs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ private static async Task ValidateOpenApiDocumentAsync(MemoryStream documentStre
documentStream.Position = 0;
OpenApiReaderRegistry.RegisterReader(OpenApiConstants.Yaml, new OpenApiYamlReader());
var result = await OpenApiDocument.LoadAsync(documentStream, format);
Assert.Empty(result.OpenApiDiagnostic.Errors);
action(result.OpenApiDocument);
Assert.Empty(result.Diagnostic.Errors);
action(result.Document);
}

private static IServiceProvider CreateServiceProvider(string documentName = Microsoft.AspNetCore.OpenApi.OpenApiConstants.DefaultDocumentName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"/getbyidandname/{id}/{name}": {
"get": {
"tags": [
"Test"
{
"name": "Test"
}
],
"parameters": [
{
Expand Down Expand Up @@ -57,7 +59,9 @@
"/forms": {
"post": {
"tags": [
"Test"
{
"name": "Test"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -89,6 +93,8 @@
}
},
"tags": [
"Test"
{
"name": "Test"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"/forms/form-file": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -38,7 +40,9 @@
"/forms/form-files": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -68,7 +72,9 @@
"/forms/form-file-multiple": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -112,7 +118,9 @@
"/forms/form-todo": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand All @@ -139,7 +147,9 @@
"/forms/forms-pocos-and-files": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -215,6 +225,8 @@
}
},
"tags": [
"Sample"
{
"name": "Sample"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"/responses/200-add-xml": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand All @@ -32,7 +34,9 @@
"/responses/200-only-xml": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand All @@ -51,7 +55,9 @@
"/responses/triangle": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand All @@ -70,7 +76,9 @@
"/responses/shape": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand Down Expand Up @@ -196,6 +204,8 @@
}
},
"tags": [
"Sample"
{
"name": "Sample"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"/schemas-by-ref/typed-results": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand All @@ -27,7 +29,9 @@
"/schemas-by-ref/multiple-results": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand Down Expand Up @@ -56,7 +60,9 @@
"/schemas-by-ref/iresult-no-produces": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand All @@ -68,7 +74,9 @@
"/schemas-by-ref/iresult-with-produces": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand All @@ -87,7 +95,9 @@
"/schemas-by-ref/primitives": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"parameters": [
{
Expand Down Expand Up @@ -121,7 +131,9 @@
"/schemas-by-ref/product": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -150,7 +162,9 @@
"/schemas-by-ref/account": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -179,7 +193,9 @@
"/schemas-by-ref/array-of-ints": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -213,7 +229,9 @@
"/schemas-by-ref/list-of-ints": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -247,7 +265,9 @@
"/schemas-by-ref/ienumerable-of-ints": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand All @@ -267,7 +287,9 @@
"/schemas-by-ref/dictionary-of-ints": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand All @@ -290,7 +312,9 @@
"/schemas-by-ref/frozen-dictionary-of-ints": {
"get": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"responses": {
"200": {
Expand All @@ -313,7 +337,9 @@
"/schemas-by-ref/shape": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand All @@ -335,7 +361,9 @@
"/schemas-by-ref/weatherforecastbase": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand All @@ -357,7 +385,9 @@
"/schemas-by-ref/person": {
"post": {
"tags": [
"Sample"
{
"name": "Sample"
}
],
"requestBody": {
"content": {
Expand Down Expand Up @@ -617,6 +647,8 @@
}
},
"tags": [
"Sample"
{
"name": "Sample"
}
]
}
Loading

0 comments on commit b2c5885

Please sign in to comment.