RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.62k stars 1.23k forks source link

Document generator generates values for controllers without apiGroupNames #4798

Open dbc-vestjylland opened 4 months ago

dbc-vestjylland commented 4 months ago

The following document generator configuration, includes all endpoints in the project, even though only a segment of the controllers are defined with the api group name.

The problem occurred after updating to version 14.03 NSwag.AspNetCore and NSwag.MSBuild. Previously only the controllers with the given group name was included in the resulting swagger.json file.

"aspNetCoreToOpenApi": {
  "project": "../VES.sample.csproj",
  "msBuildProjectExtensionsPath": null,
  "configuration": null,
  "runtime": null,
  "targetFramework": null,
  "noBuild": true,
  "msBuildOutputPath": null,
  "verbose": true,
  "workingDirectory": null,
  "requireParametersWithoutDefault": false,
  "apiGroupNames": [ "sample" ],
  "defaultPropertyNameHandling": "Default",
  "defaultReferenceTypeNullHandling": "Null",
  "defaultDictionaryValueReferenceTypeNullHandling": "NotNull",
  "defaultResponseReferenceTypeNullHandling": "NotNull",
  "generateOriginalParameterNames": true,
  "defaultEnumHandling": "Integer",
  "flattenInheritanceHierarchy": false,
  "generateKnownTypes": true,
  "generateEnumMappingDescription": true,
  "generateXmlObjects": false,
  "generateAbstractProperties": true,
  "generateAbstractSchemas": true,
  "ignoreObsoleteProperties": false,
  "allowReferencesWithProperties": false,
  "useXmlDocumentation": true,
  "resolveExternalXmlDocumentation": true,
  "excludedTypeNames": [],
  "serviceHost": null,
  "serviceBasePath": null,
  "serviceSchemes": [],
  "infoTitle": "Sample API",
  "infoDescription": null,
  "infoVersion": "1.0.0",
  "documentTemplate": null,
  "documentProcessorTypes": [],
  "operationProcessorTypes": [],
  "typeNameGeneratorType": null,
  "schemaNameGeneratorType": null,
  "contractResolverType": null,
  "serializerSettingsType": null,
  "useDocumentProvider": false,
  "documentName": "v1",
  "aspNetCoreEnvironment": null,
  "createWebHostBuilderMethod": null,
  "startupType": null,
  "allowNullableBodyParameters": true,
  "useHttpAttributeNameAsOperationId": false,
  "output": "../nswag/swagger.json",
  "outputType": "OpenApi3",
  "newLineBehavior": "Auto",
  "assemblyPaths": [],
  "assemblyConfig": null,
  "referencePaths": [],
  "useNuGetCache": false
}