Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow serializing when property and method start from "is"
Follow up for https://github.com/api-platform/core/pull/4064/files
- Loading branch information
1 parent
a32b677
commit ef4731a
Showing
8 changed files
with
192 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Feature: Serialization of boolean properties | ||
In order to use an hypermedia API | ||
As a client software developer | ||
I need to be able get boolean properties with is* methods | ||
|
||
@createSchema | ||
Scenario: Create a dummy boolean resource | ||
When I add "Content-Type" header equal to "application/ld+json" | ||
And I send a "POST" request to "/dummy_booleans" with body: | ||
""" | ||
{ | ||
"isDummyBoolean": true | ||
} | ||
""" | ||
Then the response status code should be 201 | ||
And the response should be in JSON | ||
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8" | ||
And the header "Content-Location" should be equal to "/dummy_booleans/1" | ||
And the header "Location" should be equal to "/dummy_booleans/1" | ||
And the JSON should be equal to: | ||
""" | ||
{ | ||
"@context": "/contexts/DummyBoolean", | ||
"@id": "/dummy_booleans/1", | ||
"@type": "DummyBoolean", | ||
"id": 1, | ||
"isDummyBoolean": true, | ||
"dummyBoolean": true | ||
} | ||
""" |
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
Oops, something went wrong.