Comments (7)
As the message suggest, you need to add a @OA\Items()
for your translations
property.
* @OA\Property(
* property="translations"
* type="array",
* @OA\Items()
* )
from nelmioapidocbundle.
As I said, there no documentation wrote, the property="translations"
just doesn't exist in our project.
from nelmioapidocbundle.
Do you have some more context?
- Bundle version
- Config used
- Do you use Symfony's
Map*
attributes? https://symfony.com/bundles/NelmioApiDocBundle/current/symfony_attributes.html
This warning is thrown inside the underlying swagger-php:
https://github.com/zircote/swagger-php/blob/038da8ad219f1e9c3f82c5d84c47da3b6f35039c/src/Annotations/Schema.php#L488
from nelmioapidocbundle.
- bundle version :
"nelmio/api-doc-bundle": "^4.23"
- config :
areas: # to filter documented areas
path_patterns:
- ^/v1/. # Accepts routes under /v1 except /v1/doc
disable_default_routes: true
- And yes we are using Symfony's attributes.
This warning came after installation and initialization of nelmio bundle, no more.
from nelmioapidocbundle.
This bundle should automatically add the OA\Items
on the version you are using to array properties.
NelmioApiDocBundle/src/PropertyDescriber/ArrayPropertyDescriber.php
Lines 27 to 29 in 124c182
Could you try and find the class inside your codebase which has a "translations" property
public array $translations;
That class should probably contain more information about why it does not add the OA\Items
from nelmioapidocbundle.
This is the problem, there is no var called translations in our project, I really don't know from where this error can come.
from nelmioapidocbundle.
You could try dumping $this
by temporarily editing the place where the warning is thrown inside swagger-php inside your vendor.
https://github.com/zircote/swagger-php/blob/038da8ad219f1e9c3f82c5d84c47da3b6f35039c/src/Annotations/Schema.php#L488
from nelmioapidocbundle.
Related Issues (20)
- [Bug]: Not all integer range types supported HOT 3
- [Bug]: Object of class Nelmio\ApiDocBundle\Annotation\Model could not be converted to string HOT 4
- [Bug]: Assert\NotBlank is considered regardless of it's group values HOT 1
- [Question]: Discriminator schema with Doctrine ORM Discriminator map HOT 2
- [Feature]: Webhook support
- [RFC]: Adopt Conventional Commits HOT 1
- [Question]: Is it possible to view a web form when mediaType is "application/json"? HOT 2
- [Feature]: FOSRestBundle QueryParam AND nelmio_api_doc.yaml
- [Feature]: FOSRestBundle QueryParam AND nelmio_api_doc.yaml
- [Bug]: @OA\Property excludes property from model's required array HOT 2
- [Bug]: Lost data format in schema for array of objects HOT 1
- [Feature]: Describing default error response
- [Question]: Code breaks after updating from 4.25.2 to 4.25.3 HOT 2
- [Bug]: Upgrade to 4.26.0 breaks phpunit-tests HOT 2
- [Bug]: Deprecation errors after updating to 4.26.1 HOT 4
- [Question]: Is there a way to override the documentation for a specific class/type? HOT 1
- [Bug]: Type required for oneOf defined property HOT 1
- [Question]: multiple allow_origin entries HOT 1
- [Bug]: The PropertyInfo component was not able to guess the type of Company::$edAt. You may need to add a `@var` annotation or use `@OA\Property(type="")` to make its type explicit HOT 1
- [Bug]: Symfony assertions (NotBlank) not working in DTO classes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nelmioapidocbundle.