Code Monkey home page Code Monkey logo

Comments (7)

DjordyKoert avatar DjordyKoert commented on June 8, 2024

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.

maxence-futures avatar maxence-futures commented on June 8, 2024

As I said, there no documentation wrote, the property="translations" just doesn't exist in our project.

from nelmioapidocbundle.

DjordyKoert avatar DjordyKoert commented on June 8, 2024

Do you have some more context?

This warning is thrown inside the underlying swagger-php:
https://github.com/zircote/swagger-php/blob/038da8ad219f1e9c3f82c5d84c47da3b6f35039c/src/Annotations/Schema.php#L488

from nelmioapidocbundle.

maxence-futures avatar maxence-futures commented on June 8, 2024
  • 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.

DjordyKoert avatar DjordyKoert commented on June 8, 2024

This bundle should automatically add the OA\Items on the version you are using to array properties.

$property->type = 'array';
/** @var OA\Items $property */
$property = Util::getChild($property, OA\Items::class);

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.

maxence-futures avatar maxence-futures commented on June 8, 2024

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.

DjordyKoert avatar DjordyKoert commented on June 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.