-
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.
Further changes to StringConverter to ensure special characters are p…
…roperly escaped (#331) * Add spec to demonstrate etag problem. Change StringConverter to use JsonConvert.SerializeObject to ensure correct escaping. * Added specs for string output parsing.
- Loading branch information
1 parent
de9085b
commit 4abff75
Showing
7 changed files
with
136 additions
and
18 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
29 changes: 29 additions & 0 deletions
29
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,29 @@ | ||
@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 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 body 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 with a header called 'X-Test' from the value '<Value>' of type 'System.String' | ||
Then the response should container a header called 'X-Test' with value '<ExpectedResult>' | ||
|
||
Examples: | ||
| Value | ExpectedResult | | ||
| Foo | Foo | | ||
| /1234/abc | /1234/abc | | ||
| | | | ||
| "Foo" | "Foo" | |
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