Repository navigation
Read fragments of OpenAPI Specifications - #258
Conversation
| } | ||
|
|
||
| /// <summary> | ||
| /// Reads the stream input and parses the fragment of an OpenAPI descinto an Open API Element. |
There was a problem hiding this comment.
descinto [](start = 73, length = 8)
Typo. - I'm actually not sure which word this is supposed to be a typo of :)
| { | ||
| diagnostic.Errors.Add(new OpenApiError(ex)); | ||
| } | ||
|
|
There was a problem hiding this comment.
Can we also validate the fragment after parsing?
There was a problem hiding this comment.
PerthCharern I'm not sure. I didn't think we could because of references, but as they are unresolved that shouldn't be a problem. Now I'm not sure. Will think about it some more.
There was a problem hiding this comment.
Added it. Seems to be fine.
| break; | ||
|
|
||
| case OpenApiSpecVersion.OpenApi3_0: | ||
| this.VersionService = new OpenApiV3VersionService(); |
There was a problem hiding this comment.
this. [](start = 20, length = 5)
nit, remove these "this." for consistency.
| /// </summary> | ||
| /// <param name="yamlDocument"></param> | ||
| /// <param name="version">OpenAPI version of the fragment</param> | ||
| /// <param name="diagnostic"></param> |
There was a problem hiding this comment.
nit, either remove or populate
| static ApisGuruTests() | ||
| { | ||
| System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; | ||
| _httpClient = new HttpClient(new HttpClientHandler() |
There was a problem hiding this comment.
Apparently HttpClient defaults to an earlier version of TLS that apis.guru no longer supports. This static option is just a way of telling HttpClient to use a new version of TLS.
Fix header deserialization in V2 documents
See issue #256