-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure string-typed header results are unquoted
Whereas body responses of type string are double quoted because we are designing for a Content-Type of application/json (which requires the quotes to be present), string-typed header values in earlier versions of Menes have always been unquoted. (This is consistent with input handling where untyped inputs such as headers, cookies, and query string parameters do not use quotes when we want to handle the input as a string.)
- Loading branch information
Showing
16 changed files
with
308 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
Solutions/Menes.Specs/Features/JsonTypeConversion/StringOutputParsing.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@perScenarioContainer | ||
|
||
Feature: String Output Parsing | ||
In order to implement a web API | ||
As a developer | ||
I want to be able to specify string values as or in response bodies or headers within the OpenAPI specification and have corresponding response bodies deserialized and validated | ||
|
||
|
||
Scenario Outline: Body with valid values | ||
Given I have constructed the OpenAPI specification with a response body of type 'string', and format '' | ||
When I try to build a response from the value '<Value>' of type 'System.String' | ||
Then the response body should be '<ExpectedResult>' | ||
|
||
Examples: | ||
| Value | ExpectedResult | | ||
| Foo | "Foo" | | ||
| /1234/abc | "/1234/abc" | | ||
| | "" | | ||
|
||
Scenario Outline: Header with valid values | ||
Given I have constructed the OpenAPI specification with a response header called 'X-Test' of type 'string', and format '' | ||
When I try to build a response from an OpenAPI result with these values | ||
| Name | Type | Value | | ||
| X-Test | System.String | <Value> | | ||
Then the response header called 'X-Test' should be '<ExpectedResult>' | ||
|
||
Examples: | ||
| Value | ExpectedResult | | ||
| Foo | Foo | | ||
| /1234/abc | /1234/abc | | ||
| | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.