You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What exactly is the "best practice" regarding the configuration done in the nswag.json under documentGenerator.aspNetCoreToOpenApi and in services.AddOpenApiDocument ?
I do not fully understand what exactly separates both configurations - they share some properties, but others can be found only in one of those? For example, version and title are present in both (If I'm right that infoTitle and infoVersion map to the same thing?) but output can only be defined in the nswag json (makes sense, since AddOpenApiDocument does not generate a json), but I dont see a way to define security related settings in the nswag json which is possible in AddOpenApiDocument with settings.AddSecurity.
Also it seems like not all settings from the json are correctly applied: "defaultReferenceTypeNullHandling": "NotNull" did not result in the expected openapi spec, but setting it in code did.
So, could someone explain what the intended usage of those configuration points is?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What exactly is the "best practice" regarding the configuration done in the
nswag.json
underdocumentGenerator.aspNetCoreToOpenApi
and inservices.AddOpenApiDocument
?I do not fully understand what exactly separates both configurations - they share some properties, but others can be found only in one of those? For example,
version
andtitle
are present in both (If I'm right thatinfoTitle
andinfoVersion
map to the same thing?) butoutput
can only be defined in the nswag json (makes sense, since AddOpenApiDocument does not generate a json), but I dont see a way to define security related settings in the nswag json which is possible inAddOpenApiDocument
withsettings.AddSecurity
.Also it seems like not all settings from the json are correctly applied:
"defaultReferenceTypeNullHandling": "NotNull"
did not result in the expected openapi spec, but setting it in code did.So, could someone explain what the intended usage of those configuration points is?
Beta Was this translation helpful? Give feedback.
All reactions