Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Use swagger dump as json schemas source#245

Merged
sanpii merged 3 commits intoBehatch:masterfrom
gpenverne:json-schema-swagger-validation
Mar 22, 2018
Merged

Use swagger dump as json schemas source#245
sanpii merged 3 commits intoBehatch:masterfrom
gpenverne:json-schema-swagger-validation

Conversation

@gpenverne
Copy link
Copy Markdown
Contributor

@Then the JSON should be valid according to swagger :dumpPath dump schema :schemaName
@Then the JSON should not be valid according to swagger :dumpPath dump schema :schemaName

Copy link
Copy Markdown
Member

@sanpii sanpii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for work. Please also update the i18n/en.xliff.dist file with the now definitions.

Comment thread src/Context/JsonContext.php Outdated
*/
public function theJsonShouldNotBeValidAccordingToTheSwaggerSchema($dumpPath, $schemaName)
{
try {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Asserter::not() method done exactly the same thing. Please use it.

Comment thread tests/features/json.feature Outdated
@@ -1,3 +1,5 @@
@JSON
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used locally to only run JSON behat test. Removed it.

@sanpii sanpii added this to the 3.2 milestone Mar 22, 2018
@sanpii sanpii merged commit 7e5b2d9 into Behatch:master Mar 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants