diff --git a/src/OpenApi/Tests/fixtures/api-platform-demo/.jane-openapi b/src/OpenApi/Tests/fixtures/api-platform-demo/.jane-openapi index 22dc783407..92698f6d98 100644 --- a/src/OpenApi/Tests/fixtures/api-platform-demo/.jane-openapi +++ b/src/OpenApi/Tests/fixtures/api-platform-demo/.jane-openapi @@ -1,8 +1,7 @@ 'https://demo.api-platform.com/docs.json', + 'openapi-file' => __DIR__ . '/apip-demo.json', 'namespace' => 'ApiPlatform\Demo', 'directory' => __DIR__ . '/generated', - 'use-fixer' => false, ]; diff --git a/src/OpenApi/Tests/fixtures/api-platform-demo/apip-demo.json b/src/OpenApi/Tests/fixtures/api-platform-demo/apip-demo.json new file mode 100644 index 0000000000..6691840827 --- /dev/null +++ b/src/OpenApi/Tests/fixtures/api-platform-demo/apip-demo.json @@ -0,0 +1 @@ +{"openapi":"3.0.2","info":{"title":"API Platform's demo","version":"1.0.0","description":"This is a demo application of the [API Platform](https:\/\/api-platform.com) framework.\n[Its source code](https:\/\/github.com\/api-platform\/demo) includes various examples, check it out!\nYou may also be interested by [the GraphQL entrypoint](\/graphql).\n[A PWA](https:\/\/demo-client.api-platform.com) and [an admin](https:\/\/demo-admin.api-platform.com) are consuming this API.\n"},"paths":{"\/books":{"get":{"tags":["Book"],"operationId":"getBookCollection","summary":"Retrieves the collection of Book resources.","responses":{"200":{"description":"Book collection response","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Book:jsonld-book:read"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":"string"},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/hal+json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Book-book:read"}}},"application\/vnd.api+json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Book-book:read"}}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Book-book:read"}}},"application\/xml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Book-book:read"}}},"text\/xml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Book-book:read"}}},"application\/x-yaml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Book-book:read"}}},"text\/csv":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Book-book:read"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Book-book:read"}}}}}},"parameters":[{"description":"Allows you to reduce the response to contain only the properties you need. If your desired property is nested, you can address it using nested arrays. Example: properties[]={propertyName}&properties[]={anotherPropertyName}&properties[{nestedPropertyParent}][]={nestedProperty}","name":"properties[]","schema":{"type":"array","items":{"type":"string"}},"in":"query","required":false,"style":"form","explode":true},{"name":"order[id]","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"order[title]","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"order[author]","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"order[isbn]","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"order[publicationDate]","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"author","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"The collection page number","schema":{"type":"integer","default":1}}]},"post":{"tags":["Book"],"operationId":"postBookCollection","summary":"Creates a Book resource.","responses":{"201":{"description":"Book resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Book:jsonld-book:read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}}},"links":{"GetBookItem":{"parameters":{"id":"$response.body#\/id"},"operationId":"getBookItem","description":"The `id` value returned in the response can be used as the `id` parameter in `GET \/books\/{id}`."}}},"400":{"description":"Invalid input"},"404":{"description":"Resource not found"}},"requestBody":{"content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Book:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Book"}}},"description":"The new Book resource"}}},"\/books\/{id}":{"get":{"tags":["Book"],"operationId":"getBookItem","summary":"Retrieves a Book resource.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Book resource response","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Book:jsonld-book:read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}}}},"404":{"description":"Resource not found"}}},"put":{"tags":["Book"],"operationId":"putBookItem","summary":"Replaces the Book resource.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Book resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Book:jsonld-book:read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}}}},"400":{"description":"Invalid input"},"404":{"description":"Resource not found"}},"requestBody":{"content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Book:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Book"}}},"description":"The updated Book resource"}},"patch":{"tags":["Book"],"operationId":"patchBookItem","summary":"Updates the Book resource.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Book resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Book:jsonld-book:read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Book-book:read"}}}},"400":{"description":"Invalid input"},"404":{"description":"Resource not found"}},"requestBody":{"content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Book"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Book"}}},"description":"The updated Book resource"}},"delete":{"tags":["Book"],"operationId":"deleteBookItem","summary":"Removes the Book resource.","responses":{"204":{"description":"Book resource deleted"},"404":{"description":"Resource not found"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"\/books\/{id}\/reviews":{"get":{"tags":["Review","Book"],"operationId":"api_books_reviews_get_subresource","summary":"Retrieves the collection of Review resources.","responses":{"200":{"description":"Review collection response","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review:jsonld-review:read"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":"string"},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/hal+json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"application\/vnd.api+json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"application\/xml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"text\/xml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"application\/x-yaml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"text\/csv":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}}}},"404":{"description":"Resource not found"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"order[id]","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"order[publicationDate]","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"book","in":"query","required":false,"schema":{"type":"string"}},{"name":"book[]","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},{"name":"page","in":"query","required":false,"description":"The collection page number","schema":{"type":"integer","default":1}}]}},"\/parchments":{"get":{"tags":["Parchment"],"operationId":"getParchmentCollection","deprecated":true,"summary":"Retrieves the collection of Parchment resources.","responses":{"200":{"description":"Parchment collection response","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Parchment:jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":"string"},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/hal+json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Parchment"}}},"application\/vnd.api+json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Parchment"}}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Parchment"}}},"application\/xml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Parchment"}}},"text\/xml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Parchment"}}},"application\/x-yaml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Parchment"}}},"text\/csv":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Parchment"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Parchment"}}}}}},"parameters":[{"name":"page","in":"query","required":false,"description":"The collection page number","schema":{"type":"integer","default":1}}]},"post":{"tags":["Parchment"],"operationId":"postParchmentCollection","deprecated":true,"summary":"Creates a Parchment resource.","responses":{"201":{"description":"Parchment resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}}},"links":{"GetParchmentItem":{"parameters":{"id":"$response.body#\/id"},"operationId":"getParchmentItem","description":"The `id` value returned in the response can be used as the `id` parameter in `GET \/parchments\/{id}`."}}},"400":{"description":"Invalid input"},"404":{"description":"Resource not found"}},"requestBody":{"content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}}},"description":"The new Parchment resource"}}},"\/parchments\/{id}":{"get":{"tags":["Parchment"],"operationId":"getParchmentItem","deprecated":true,"summary":"Retrieves a Parchment resource.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Parchment resource response","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}}}},"404":{"description":"Resource not found"}}},"delete":{"tags":["Parchment"],"operationId":"deleteParchmentItem","deprecated":true,"summary":"Removes the Parchment resource.","responses":{"204":{"description":"Parchment resource deleted"},"404":{"description":"Resource not found"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"put":{"tags":["Parchment"],"operationId":"putParchmentItem","deprecated":true,"summary":"Replaces the Parchment resource.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Parchment resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}}}},"400":{"description":"Invalid input"},"404":{"description":"Resource not found"}},"requestBody":{"content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}}},"description":"The updated Parchment resource"}},"patch":{"tags":["Parchment"],"operationId":"patchParchmentItem","deprecated":true,"summary":"Updates the Parchment resource.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Parchment resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}}}},"400":{"description":"Invalid input"},"404":{"description":"Resource not found"}},"requestBody":{"content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Parchment"}}},"description":"The updated Parchment resource"}}},"\/reviews":{"get":{"tags":["Review"],"operationId":"getReviewCollection","summary":"Retrieves the collection of Review resources.","responses":{"200":{"description":"Review collection response","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review:jsonld-review:read"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":"string"},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/hal+json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"application\/vnd.api+json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"application\/xml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"text\/xml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"application\/x-yaml":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"text\/csv":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Review-review:read"}}}}}},"parameters":[{"name":"order[id]","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"order[publicationDate]","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"book","in":"query","required":false,"schema":{"type":"string"}},{"name":"book[]","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},{"name":"page","in":"query","required":false,"description":"The collection page number","schema":{"type":"integer","default":1}}]},"post":{"tags":["Review"],"operationId":"postReviewCollection","summary":"Creates a Review resource.","responses":{"201":{"description":"Review resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Review:jsonld-review:read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}}},"links":{"GetReviewItem":{"parameters":{"id":"$response.body#\/id"},"operationId":"getReviewItem","description":"The `id` value returned in the response can be used as the `id` parameter in `GET \/reviews\/{id}`."}}},"400":{"description":"Invalid input"},"404":{"description":"Resource not found"}},"requestBody":{"content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Review:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Review"}}},"description":"The new Review resource"}}},"\/reviews\/{id}":{"get":{"tags":["Review"],"operationId":"getReviewItem","summary":"Retrieves a Review resource.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Review resource response","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Review:jsonld-review:read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}}}},"404":{"description":"Resource not found"}}},"delete":{"tags":["Review"],"operationId":"deleteReviewItem","summary":"Removes the Review resource.","responses":{"204":{"description":"Review resource deleted"},"404":{"description":"Resource not found"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"put":{"tags":["Review"],"operationId":"putReviewItem","summary":"Replaces the Review resource.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Review resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Review:jsonld-review:read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}}}},"400":{"description":"Invalid input"},"404":{"description":"Resource not found"}},"requestBody":{"content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Review:jsonld"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Review"}}},"description":"The updated Review resource"}},"patch":{"tags":["Review"],"operationId":"patchReviewItem","summary":"Updates the Review resource.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Review resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Review:jsonld-review:read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/xml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"application\/x-yaml":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/csv":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Review-review:read"}}}},"400":{"description":"Invalid input"},"404":{"description":"Resource not found"}},"requestBody":{"content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Review"}},"application\/vnd.api+json":{"schema":{"$ref":"#\/components\/schemas\/Review"}}},"description":"The updated Review resource"}}}},"security":[{"apiKey":[]}],"components":{"schemas":{"Book":{"type":"object","description":"A book.","externalDocs":{"url":"http:\/\/schema.org\/Book"},"properties":{"isbn":{"description":"The ISBN of the book","externalDocs":{"url":"http:\/\/schema.org\/isbn"},"type":"string"},"title":{"description":"The title of the book","externalDocs":{"url":"http:\/\/schema.org\/name"},"type":"string"},"description":{"description":"A description of the item","externalDocs":{"url":"http:\/\/schema.org\/description"},"type":"string"},"author":{"description":"The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably","externalDocs":{"url":"http:\/\/schema.org\/author"},"type":"string"},"publicationDate":{"description":"The date on which the CreativeWork was created or the item was added to a DataFeed","externalDocs":{"url":"http:\/\/schema.org\/dateCreated"},"type":"string","format":"date-time"},"reviews":{"description":"The book's reviews","externalDocs":{"url":"http:\/\/schema.org\/reviews"},"type":"array","items":{"$ref":"#\/components\/schemas\/Review"}}},"required":["title","description","author","publicationDate"]},"Book-book:read":{"type":"object","description":"A book.","externalDocs":{"url":"http:\/\/schema.org\/Book"},"properties":{"isbn":{"description":"The ISBN of the book","externalDocs":{"url":"http:\/\/schema.org\/isbn"},"type":"string"},"title":{"description":"The title of the book","externalDocs":{"url":"http:\/\/schema.org\/name"},"type":"string"},"description":{"description":"A description of the item","externalDocs":{"url":"http:\/\/schema.org\/description"},"type":"string"},"author":{"description":"The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably","externalDocs":{"url":"http:\/\/schema.org\/author"},"type":"string"},"publicationDate":{"description":"The date on which the CreativeWork was created or the item was added to a DataFeed","externalDocs":{"url":"http:\/\/schema.org\/dateCreated"},"type":"string","format":"date-time"},"reviews":{"description":"The book's reviews","externalDocs":{"url":"http:\/\/schema.org\/reviews"},"type":"array","items":{"$ref":"#\/components\/schemas\/Review-book:read"}}},"required":["title","description","author","publicationDate"]},"Book-review:read":{"type":"object","description":"A book.","externalDocs":{"url":"http:\/\/schema.org\/Book"},"required":["title"],"properties":{"title":{"description":"The title of the book","externalDocs":{"url":"http:\/\/schema.org\/name"},"type":"string"}}},"Book:jsonld":{"type":"object","description":"A book.","externalDocs":{"url":"http:\/\/schema.org\/Book"},"properties":{"@context":{"readOnly":true,"type":"string"},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"isbn":{"description":"The ISBN of the book","externalDocs":{"url":"http:\/\/schema.org\/isbn"},"type":"string"},"title":{"description":"The title of the book","externalDocs":{"url":"http:\/\/schema.org\/name"},"type":"string"},"description":{"description":"A description of the item","externalDocs":{"url":"http:\/\/schema.org\/description"},"type":"string"},"author":{"description":"The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably","externalDocs":{"url":"http:\/\/schema.org\/author"},"type":"string"},"publicationDate":{"description":"The date on which the CreativeWork was created or the item was added to a DataFeed","externalDocs":{"url":"http:\/\/schema.org\/dateCreated"},"type":"string","format":"date-time"},"reviews":{"description":"The book's reviews","externalDocs":{"url":"http:\/\/schema.org\/reviews"},"type":"array","items":{"$ref":"#\/components\/schemas\/Review:jsonld"}}},"required":["title","description","author","publicationDate"]},"Book:jsonld-book:read":{"type":"object","description":"A book.","externalDocs":{"url":"http:\/\/schema.org\/Book"},"properties":{"@context":{"readOnly":true,"type":"string"},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"isbn":{"description":"The ISBN of the book","externalDocs":{"url":"http:\/\/schema.org\/isbn"},"type":"string"},"title":{"description":"The title of the book","externalDocs":{"url":"http:\/\/schema.org\/name"},"type":"string"},"description":{"description":"A description of the item","externalDocs":{"url":"http:\/\/schema.org\/description"},"type":"string"},"author":{"description":"The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably","externalDocs":{"url":"http:\/\/schema.org\/author"},"type":"string"},"publicationDate":{"description":"The date on which the CreativeWork was created or the item was added to a DataFeed","externalDocs":{"url":"http:\/\/schema.org\/dateCreated"},"type":"string","format":"date-time"},"reviews":{"description":"The book's reviews","externalDocs":{"url":"http:\/\/schema.org\/reviews"},"type":"array","items":{"$ref":"#\/components\/schemas\/Review:jsonld-book:read"}}},"required":["title","description","author","publicationDate"]},"Book:jsonld-review:read":{"type":"object","description":"A book.","externalDocs":{"url":"http:\/\/schema.org\/Book"},"required":["title"],"properties":{"@context":{"readOnly":true,"type":"string"},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"title":{"description":"The title of the book","externalDocs":{"url":"http:\/\/schema.org\/name"},"type":"string"}}},"Parchment":{"type":"object","description":"","deprecated":true,"required":["title","description"],"properties":{"title":{"description":"The title of the book","type":"string"},"description":{"description":"A description of the item","type":"string"},"id":{"readOnly":true,"type":"string"}}},"Parchment:jsonld":{"type":"object","description":"","deprecated":true,"required":["title","description"],"properties":{"@context":{"readOnly":true,"type":"string"},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"title":{"description":"The title of the book","type":"string"},"description":{"description":"A description of the item","type":"string"},"id":{"readOnly":true,"type":"string"}}},"Review":{"type":"object","description":"A review of an item - for example, of a restaurant, movie, or store.","externalDocs":{"url":"http:\/\/schema.org\/Review"},"properties":{"body":{"description":"The actual body of the review","externalDocs":{"url":"http:\/\/schema.org\/reviewBody"},"type":"string"},"rating":{"description":"A rating","type":"integer"},"letter":{"description":"DEPRECATED (use rating now): A letter to rate the book","deprecated":true,"type":"string"},"author":{"description":"The author of the review","externalDocs":{"url":"http:\/\/schema.org\/author"},"type":"string"},"publicationDate":{"description":"Publication date of the review","type":"string","format":"date-time"},"book":{"description":"The item that is being reviewed\/rated","externalDocs":{"url":"http:\/\/schema.org\/itemReviewed"},"$ref":"#\/components\/schemas\/Book"}},"required":["book"]},"Review-book:read":{"type":"object","description":"A review of an item - for example, of a restaurant, movie, or store.","externalDocs":{"url":"http:\/\/schema.org\/Review"},"properties":{"body":{"description":"The actual body of the review","externalDocs":{"url":"http:\/\/schema.org\/reviewBody"},"type":"string"}}},"Review-review:read":{"type":"object","description":"A review of an item - for example, of a restaurant, movie, or store.","externalDocs":{"url":"http:\/\/schema.org\/Review"},"properties":{"body":{"description":"The actual body of the review","externalDocs":{"url":"http:\/\/schema.org\/reviewBody"},"type":"string"},"rating":{"description":"A rating","type":"integer"},"letter":{"description":"DEPRECATED (use rating now): A letter to rate the book","deprecated":true,"type":"string"},"book":{"description":"The item that is being reviewed\/rated","externalDocs":{"url":"http:\/\/schema.org\/itemReviewed"},"$ref":"#\/components\/schemas\/Book-review:read"},"author":{"description":"The author of the review","externalDocs":{"url":"http:\/\/schema.org\/author"},"type":"string"},"publicationDate":{"description":"Publication date of the review","type":"string","format":"date-time"}},"required":["book"]},"Review:jsonld":{"type":"object","description":"A review of an item - for example, of a restaurant, movie, or store.","externalDocs":{"url":"http:\/\/schema.org\/Review"},"properties":{"@context":{"readOnly":true,"type":"string"},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"body":{"description":"The actual body of the review","externalDocs":{"url":"http:\/\/schema.org\/reviewBody"},"type":"string"},"rating":{"description":"A rating","type":"integer"},"letter":{"description":"DEPRECATED (use rating now): A letter to rate the book","deprecated":true,"type":"string"},"author":{"description":"The author of the review","externalDocs":{"url":"http:\/\/schema.org\/author"},"type":"string"},"publicationDate":{"description":"Publication date of the review","type":"string","format":"date-time"},"book":{"description":"The item that is being reviewed\/rated","externalDocs":{"url":"http:\/\/schema.org\/itemReviewed"},"$ref":"#\/components\/schemas\/Book:jsonld"}},"required":["book"]},"Review:jsonld-book:read":{"type":"object","description":"A review of an item - for example, of a restaurant, movie, or store.","externalDocs":{"url":"http:\/\/schema.org\/Review"},"properties":{"@context":{"readOnly":true,"type":"string"},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"body":{"description":"The actual body of the review","externalDocs":{"url":"http:\/\/schema.org\/reviewBody"},"type":"string"}}},"Review:jsonld-review:read":{"type":"object","description":"A review of an item - for example, of a restaurant, movie, or store.","externalDocs":{"url":"http:\/\/schema.org\/Review"},"properties":{"@context":{"readOnly":true,"type":"string"},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"body":{"description":"The actual body of the review","externalDocs":{"url":"http:\/\/schema.org\/reviewBody"},"type":"string"},"rating":{"description":"A rating","type":"integer"},"letter":{"description":"DEPRECATED (use rating now): A letter to rate the book","deprecated":true,"type":"string"},"book":{"description":"The item that is being reviewed\/rated","externalDocs":{"url":"http:\/\/schema.org\/itemReviewed"},"$ref":"#\/components\/schemas\/Book:jsonld-review:read"},"author":{"description":"The author of the review","externalDocs":{"url":"http:\/\/schema.org\/author"},"type":"string"},"publicationDate":{"description":"Publication date of the review","type":"string","format":"date-time"}},"required":["book"]}},"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","description":"Value for the Authorization header","name":"Authorization"}}}} \ No newline at end of file diff --git a/src/OpenApi/Tests/fixtures/test-nullable-array/.jane-openapi b/src/OpenApi/Tests/fixtures/test-nullable-array/.jane-openapi index 429214c228..b6f5b3f3b2 100644 --- a/src/OpenApi/Tests/fixtures/test-nullable-array/.jane-openapi +++ b/src/OpenApi/Tests/fixtures/test-nullable-array/.jane-openapi @@ -4,5 +4,4 @@ return [ 'openapi-file' => __DIR__ . '/schema.json', 'namespace' => 'Jane\OpenApi\Tests\Expected', 'directory' => __DIR__ . '/generated', - 'use-fixer' => false, ];