Fixed security requirement resolution #226
Conversation
| Walk(OpenApiConstants.Callbacks, () => Walk(operation.Callbacks)); | ||
| Walk(OpenApiConstants.Tags, () => Walk(operation.Tags)); | ||
|
|
||
| Walk(OpenApiConstants.Security, () => Walk(operation.Security)); |
There was a problem hiding this comment.
If we miss add the process code, it should not be failed. So, I can't understand why? Is there any default setting that we can fix it?
There was a problem hiding this comment.
I'm not sure I follow. If we are missing Walk() methods then there may be references that remain unresolved or objects not validated. Technically that's not an error as Unresolved references is a valid state. They could be resolved manually later.
Yes, there has been an unfortunate number of cases of missing resolved references. In theory these should have been picked up by regular test cases as unresolved references have null/default property values.. Not quite sure why more were not.
|
Also, I'd like we should have some test cases to cover it. |
| } | ||
|
|
||
| /// <summary> | ||
| /// Resolve all references to SecuritySchemes |
There was a problem hiding this comment.
the comments should be "SecurityRequirement" not "SecuritySchemes" ?
There was a problem hiding this comment.
Actually no. SecurityRequirement is a dictionary whose keys are SecuritySchemes. It is those keys that are being replaced if they are unresolved references.
Fixes #222