Skip to content
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

Deserialize error with property contain "$", such as $ref #369

Closed
phuongmathy opened this issue Mar 1, 2017 · 2 comments
Closed

Deserialize error with property contain "$", such as $ref #369

phuongmathy opened this issue Mar 1, 2017 · 2 comments

Comments

@phuongmathy
Copy link

phuongmathy commented Mar 1, 2017

use Swagger\Serializer;

$serializer = new Serializer();
$swagger = $serializer->deserialize($jsonString, 'Swagger\Annotations\Swagger');
echo $swagger;

Notice: Unexpected field "$ref" for @swg\Schema(), expecting "ref", "title", "description", "maxProperties", "minProperties", "required", "properties", "type", "format", "items", "collectionFormat", "default", "maximum", "exclusiveMaximum", "minimum", "exclusiveMinimum", "maxLength", "minLength", "pattern", "maxItems", "minItems", "uniqueItems", "enum", "multipleOf", "discriminator", "readOnly", "xml", "externalDocs", "example", "allOf", "additionalProperties", "x" in \Swagger\Serializer->doDeserialize() in /vagrant/library/vendor/zircote/swagger-php/src/Serializer.php on line 98 in /vagrant/library/vendor/zircote/swagger-php/src/Logger.php on line 38

@ivoba
Copy link
Contributor

ivoba commented May 3, 2017

should be fixed in 3e319bd

@bfanger
Copy link
Collaborator

bfanger commented May 12, 2017

Fixed in v2.0.10

@bfanger bfanger closed this as completed May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants