Repository navigation
Add deserializers and restructure the Reader unit tests - #113
Conversation
- Fix deserializer for SecurityScheme, Schema, Document - Update V2Tests
- Restructure the tests to resemble the deserializers. Future tests can now be written per object type.
- Fix callback tests
- Fix issues in Schema Deserializer
|
|
||
| namespace Microsoft.OpenApi.Tests.Models | ||
| { | ||
| [Collection("DefaultSettings")] |
There was a problem hiding this comment.
[Collection("DefaultSettings")] [](start = 1, length = 34)
I'll create another issue to add this Fixture to all test classes in Microsoft.OpenApi.Tests in a separate PR since I don't want to blow up this one, which is already pretty big.
Nothing is failing there right now, but this is a good safeguard.
| public class ParameterTests | ||
| { | ||
| [Collection("DefaultSettings")] | ||
| public class OpenApiParameterTests |
There was a problem hiding this comment.
OpenApiParameterTests [](start = 17, length = 21)
This behavior should not be in scope for our library. Handling different ways to serialize parameter based on the given properties should be the job of other toolings (e.g. Swagger UI). I'll remove this test.
…de is out of scope for our library.
| namespace Microsoft.OpenApi.Readers.V2 | ||
| { | ||
| /// <summary> | ||
| /// Class containing logic to deserialize Open API V3 document into |
There was a problem hiding this comment.
Will fix comment to V2
| } | ||
|
|
||
| // Put the Flow object in the right Flows property based on the string in "flow" | ||
| if (flowValue == OpenApiConstants.Implicit) |
There was a problem hiding this comment.
if [](start = 12, length = 2)
nit, consider a switch statement
There was a problem hiding this comment.
I'll make this fix with a future PR.
| <None Include="V3Tests\Samples\OpenApiCallback\advancedCallbackWithReference.yaml"> | ||
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| </None> | ||
| <None Include="V3Tests\Samples\OpenApiInfo\advancedInfo.yaml"> |
There was a problem hiding this comment.
[](start = 4, length = 2)
nit, indentation
|
I'm going to merge this so that I can add more tests without creating merge conflicts. |
Fix #32, Fix #50, Fix #109
Deserializer
Unit tests
File.OpenRead