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

issue with 'anyOf' in Examples/swagger-spec/petstore-with-external-docs #300

Closed
senechko opened this issue Mar 29, 2016 · 1 comment
Closed

Comments

@senechko
Copy link

from this commit:
e58584c

getting warnings:

php bin/swagger Examples/swagger-spec/petstore-with-external-docs/ -o petstore.json

Swagger-PHP 2.0.6
-----------------
[INFO] Unexpected field "a" for @SWG\Definition(), expecting "definition", "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 \PetWithDocsController->addPet() in Examples/swagger-spec/petstore-with-external-docs/\controllers\PetWithDocsController.php on line 9

[INFO] Unexpected field "l" for @SWG\Definition(), expecting "definition", "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", "a" in \PetWithDocsController->addPet() in Examples/swagger-spec/petstore-with-external-docs/\controllers\PetWithDocsController.php on line 9

    get /pets
   post /pets
    get /pets/{id}
 delete /pets/{id}
-----------------------
4 operations documented
-----------------------
[NOTICE] Undefined index: a in C:\temp\swagger-php\src\Annotations\AbstractAnnotation.php on line 249
[NOTICE] Undefined index: l in C:\temp\swagger-php\src\Annotations\AbstractAnnotation.php on line 249
Written to C:\temp\swagger-php\petstore.json

cc: @bfanger

@bfanger
Copy link
Collaborator

bfanger commented Mar 29, 2016

I didn't test the patch in PHP < 7. Travis-CI caught the bug but email notifications where turned off 😓. Thanks for reporting the issue 👍

bfanger added a commit that referenced this issue May 27, 2016
 - Beter validation of type="file" #305
 - Augment Operations summary and description based on the comment. #293
 - Bugfixes #300
 - Add support for xml (and externalDocs and properties) inside a @swg\Items. #279
 - Nested properties are no longer injected into the Definition #297
 - Fixed nesting issue with verbose property notation #297
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

2 participants