-
Notifications
You must be signed in to change notification settings - Fork 59
Webexception handling, possible fix for #132 #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -412,7 +412,20 @@ module Parsers = | |
| | "options" -> Some <| parseOperationObject context path Options obj | ||
| | "head" -> Some <| parseOperationObject context path Head obj | ||
| | "patch" -> Some <| parseOperationObject context path Patch obj | ||
| | "$ref" -> failwith "External definition of this path item is not supported yet" | ||
| | "$ref" -> | ||
| let fileName = obj.AsString() | ||
| let path = | ||
| // If path is empty: | ||
| // We could match something like interactive __SOURCE_DIRECTORY__ | ||
| // or else (System.Reflection.Assembly.GetExecutingAssembly().Location |> System.IO.Path.GetDirectoryName) | ||
| obj.GetStringSafe("basePath") | ||
| let filePath = System.IO.Path.Combine [| path; (if fileName.Contains("#") then fileName.Split('#').[0] else fileName) |] | ||
|
|
||
| let schemaData = | ||
| SwaggerProvider.Internal.SchemaReader.readSchemaPath "" filePath | ||
| |> Async.RunSynchronously | ||
|
|
||
| failwith "External definition of this path item is not supported yet" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Thorium few questions here
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, with this commit was an earlier commit for the other PR #152 |
||
| | _ -> None | ||
| let updateContext (pathItemObj:SchemaNode) = | ||
| match pathItemObj.TryGetProperty("parameters") with | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| token: | ||
| post: | ||
| summary: Just a test | ||
| operationId: test_token | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../v2/token.yaml | ||
| responses: | ||
| "200": | ||
| description: Generated | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../v2/token.yaml | ||
| default: | ||
| $ref: ../error.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this line is inside async we can replace in by