Open ideafixxxer opened 5 years ago
Can you provide a sample spec/project?
It starts like this:
"x-generator": "NSwag v12.1.0.0 (NJsonSchema v9.13.29.0 (Newtonsoft.Json v9.0.0.0))",
"openapi": "3.0.0",
"info": {
"title": "My API",
"description": "My API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://localhost/DonServices/api"
}
],
"paths": {
"/v2.0/alerts/{id}": {
"get": {
"tags": [
"Alert"
],
"operationId": "Alert_GetAlert",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
},
{
"type": "string",
"name": "Auth-Provider",
"in": "header",
"default": "Custom1",
"x-enumNames": [
"Custom1",
"Custom2"
]
},
{
"type": "string",
"name": "Authorization",
"in": "header",
"required": true,
"description": "auth access token"
}
],
Having the same issue:
services.AddSwaggerDocument(document =>
{
document.PostProcess = d =>
{
d.SchemaType = NJsonSchema.SchemaType.OpenApi3;
};
};
Removing d.SchemaType = NJsonSchema.SchemaType.OpenApi3; fixes it for now, but it used to work.
Can someone provide a C# ASP.NET Core sample controller where we can reproduce this?
I see the following error in OAS3
Name | Description id *integer(path) | Could not render this component, see the console. Could not render this component, see the console.
The console:
It works in Swagger2 though.