i want to generate the swagger document for plugins.
I point the endpoint for the api to a plugincontroller. In this i have a method to create the documentation for a particular version. While loading the plugin all items are already registered in the swagger tooling. (somehow the new documents don't get picked up by the swagger middleware that is why i need this workaround.)
[HttpGet("api/plugins/swaggerdoc/{version}")]
public IActionResult GetSwaggerDoc(string version)
{
SwaggerDocument gen = new SwaggerGenerator(apiDescriptionGroupCollectionProvider, schemaRegistryFactory, Swagger.SwaggerElements.GeneratorOptions.SwaggerGeneratorOptions).GetSwagger(version);
return Ok(gen);
}
but it fails to generate the document properly. It shows to much information about the properties. e.g.
"parameters":[
{
"name":"api-version",
"in":"query",
"description":null,
"required":false,
"type":"string",
"format":null,
"items":null,
"collectionFormat":null,
"default":null,
"maximum":null,
"exclusiveMaximum":null,
"minimum":null,
"exclusiveMinimum":null,
"maxLength":null,
"minLength":null,
"pattern":null,
"maxItems":null,
"minItems":null,
"uniqueItems":null,
"enum":null,
"multipleOf":null
}
how can i resolve this issue?