Questions tagged [nelmioapidocbundle]

The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs.

The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs. More information on the github page.

118 questions
1
vote
1 answer

No route found for "GET /api/doc.json" after nelmio upgrade

I just updated nelmio/api-doc-bundle from 3.2 to 4.3 using composer. Now when I view /api/doc.json on my application (which previously showed a list of API endpoints), I get this error: No route found for "GET /api/doc.json" Here is the content of…
1
vote
1 answer

Symfony 5 NelmioDocsBundle and JMS Seralizer

Having a bit of trouble understanding the combo of tools in the title. When I view my docs the model is empty: That said I've tried a bunch of things including disabling jms which works but I want to use JMS. Here's my…
Lulceltech
  • 1,662
  • 11
  • 22
1
vote
1 answer

NelmioApiDocBundle negative path_patterns

Right now I try to create an API documentation in Symfony 3 with the NelmioApiDocBundle. So far everything works as described in the given symfony documentation. Now I'd like to remove the _error and _profiler routes from the swagger docs. It says…
Andy
  • 762
  • 6
  • 14
1
vote
1 answer

Nelmio 4 security definitions index not found

I try to configure nelmio/api-doc-bundle to use Authorization header for my Bearer token. I configure it in nelmio_api_doc.yaml like this nelmio_api_doc: documentation: info: title: title version: 1.0.0 …
GrenierJ
  • 1,145
  • 8
  • 18
1
vote
3 answers

Symfony 4 - JWT not found with LexikJWTAuthenticationBundle

Good afternoon, I try to use LexikJWTAuthenticationBundle in my project and I have a problem with the token which is not generated. I have set the private & public keys in var/jwt directory. The API returns this response when I try use the login…
nboulfroy
  • 201
  • 3
  • 14
1
vote
1 answer

NelmioApiDocBundle v4.0.0-BETA1, $ref not found

I have a DTO like this: # AppBundle\DTO /** * @OA\Schema( * schema="ProductDto", * type="object", * required={ * "foo", * "bar", * "baz", * }, * ) */ class ProductDto { /** *…
user3180943
  • 181
  • 1
  • 2
  • 17
1
vote
0 answers

Problem with use Model in Property annotation. Should be model not array

"nelmio/api-doc-bundle": "^3.6@dev" I need response with model with property product which eque one model Product and property count, but when I use Mode annotation I faced with probem, response model generated like array Product. What I'm doing…
shuba.ivan
  • 3,824
  • 8
  • 49
  • 121
1
vote
3 answers

Nelmio API doc area and bearer token with symfony 4

I have API in Symfony 4. I added NelmioApiDocBundle to my project, but i have problem with my docs. This is my configuration: packages\nelmio_api_doc.yaml nelmio_api_doc: documentation: # schemes: [http, https] info: …
PawelC
  • 1,128
  • 3
  • 21
  • 47
1
vote
2 answers

Swagger PHP annotation for object of array

I want to include Array of objects in api/doc view. But I am unable to get that. From the code below: @SWG\Schema( @SWG\Property(property="project-name", type="string"), @SWG\Property(property="project-detail", type="array", …
Rahul G.
  • 21
  • 1
  • 5
1
vote
2 answers

How to hide Api-plaform Docs from Nelmio Docs

I hope someone could help me to use Api-platorm with Nelmio. I use Api-plaform and Nelmio. I need to hide the Api-platform docs from Nelmio. I need to have 3 routes: /internal -> API-Platform Docs /external -> NELMIO-Docs /admin -> NELMIO-Docs My…
1
vote
0 answers

How to set, that param value can be null in nelmio api doc?

I have an API in Symfony Flex, that is documented with use of NelmioApiDocBundle. In Documentation, I want to show, that parentPOSId parameter can be int or null. How can I do it? This are my controller annotations: /** * *…
Anna
  • 43
  • 6
1
vote
0 answers

NelmioApiDocBundle doesn't work “No operations defined in spec!” Symfony 3.4

I want to configure nelmio to my symfony 3 project. I installed the bundle but at the end I get a message of no operations defined !!!! Whats's wrong? Any ideas? /** * List the rewards of the specified user. * * This call takes into…
Bilel
  • 339
  • 1
  • 2
  • 6
1
vote
0 answers

I'm using NelmioApiDocBundle to document my API. How do I enforce the validations in the annotations?

So I'm using NelmioApiDocBundle to document my API in swagger format. When i go to mydomain.com/api/doc I can see the documentation and it's fine. But for example I'm setting the query parameter (test_query1) as required, and when I call the API…
Osama Aref
  • 13
  • 2
1
vote
1 answer

Writing Swagger documentation for requests in body without model referencing

How to write Swagger documentation for requests in body without model referencing? e.g: @SWG\Parameter( name="date", in="body", content="application/json", type="object", {custom written JSON} ) I have tried to do it in…
Bengall
  • 1,267
  • 2
  • 9
  • 13
1
vote
0 answers

Significance of resource parameter in Nelmiobundles API doc parameter

What is the significance of resource parameter in NelmioBundle's APIDoc annotation? It accepts boolean value (https://symfony.com/doc/2.x/bundles/NelmioApiDocBundle/the-apidoc-annotation.html) Can someone explain the exact use case to use true /…
Mohan
  • 172
  • 1
  • 11