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
55
votes
2 answers

Group exclusion in Nelmio Api Doc does not work After updating composer

I set up a parameter as array, as described in http://jmsyst.com/libs/serializer/master/reference/annotations class QuestionAnswer { /** * @JMS\Type("ArrayCollection") *…
Hayk Grigoryan
  • 651
  • 7
  • 13
7
votes
3 answers

How specify parameter's format in Nelmio ApiDocBundle

I use input property of @ApiDoc annotation for specifieng of parameters of my api that are form's fields. * @ApiDoc( * section="User", * resource=true, * input={ * "class"="Nik\UserBundle\Form\UserType", * }, * …
ghanbari
  • 1,630
  • 1
  • 16
  • 31
5
votes
1 answer

How to add JSON request and response examples in Swagger (OpenApi)?

I have an API endpoint in my Symfony 4 application, that I want to document with NelmioApiDocBundle and Swagger. The endpoint takes JSON as a request data and also returns some custom JSON as the response. How can I add examples of them to the…
Boykodev
  • 850
  • 1
  • 10
  • 23
5
votes
1 answer

Symfony - NelmioApiDocBundle: Show parameter description imported from class

I am using the NelmioApiDocBundle together with the PHP framework Symfony3 for a REST API. I want to display the description of my parameters in the /api/doc page. Is this possible without adding the parameters manually? I want to import it from the…
Orlando
  • 489
  • 7
  • 19
5
votes
1 answer

Nelmio Api Doc Bundle: Documentating required Parameters

I am currently working with the NelmioApiDocBundle, with which I am not very familiar yet. The API I am writing has to provide a route to change the password of a specific user. The documentation should state, that for changing the password both the…
4
votes
3 answers

NelmioApiDocBundle doesn't work "No operations defined in spec!"

I want to use nelmio for symfony-project, but it doesn't work. It always says: No operations defined in spec! I also try the example on https://symfony.com/doc/current/bundles/NelmioApiDocBundle/index.html Whats's wrong? Any…
gondor
  • 93
  • 2
  • 8
4
votes
1 answer

Symfony NelmioApiDocBundle swagger-ui PHP Annotations json object with array of objects properties not showing

I'm trying to post json with NelmioApiDocBundle, I have the json example showing up but the array object properties are not showing in the try it out example? I have tried several methods to accomplish this without success, Below is the code I have…
user1930591
  • 307
  • 5
  • 22
4
votes
1 answer

Headers nelmio API doc

I want to define a parameter in Headers in sandbox of Nelmio API Doc Bundle. How can I define this in annotation of Nelmio ApiDoc ? @ApiDoc( resource=true, description="Return the information", requirements={ { …
ichrak ABID
  • 81
  • 1
  • 4
3
votes
1 answer

Is the schemas section in the nelmio_api_doc.yaml required?

I have been setting up the Nelmio API Doc Bundle with Swagger-PHP. All is working as expected the only thing I cannot seem to figure out/understand is the schemas. In the User controller I have the following annotation: * @OA\RequestBody( …
RolandD
  • 70
  • 1
  • 6
3
votes
1 answer

Swagger annotation for query parameters

I am converting a POST request to a GET request. I am using NelmioApiDocBundle to document my API endpoints. I currently have the following (old) annotation: /** * @SWG\Response( * response=200, * description="Success - return JSON", *…
3
votes
0 answers

Nelmio API Doc Array Parameter

In terms of Symfony 4, using Swagger\Annotations, how may I define a query Parameter as an Array? q[a]=1&q[b]=foo I was doing it using Symfony 2 few years ago and cannot recall it nor find in Google... Please advice
Roman Newaza
  • 11,405
  • 11
  • 58
  • 89
3
votes
3 answers

NelmioApiDocBundle not generate documentation

I want to use NelmioApiDocBundle for generating documentation automatically. I fallowed standard Symfony doc to install and configure it: https://symfony.com/doc/current/bundles/NelmioApiDocBundle/index.html. Unfortunately when I go to /api/doc my…
3
votes
1 answer

NelmioApiDoc model definition / how to ignore getter or alias to existing property with other name?

Can we overwride model accessor property name or ignore it? Here my User::getUsername function which is an getter for email property (I need this function named like that to implement interface): class User extends AbstractDocument implements…
FAjir
  • 4,384
  • 2
  • 26
  • 30
3
votes
4 answers

Is there any way to use multiple yml file with nelmio_api_doc in symfony 3 with NelmioApiDocBundle?

NelmioApiDocBundle is allowing only single configuration file as .yml as. nelmio_api_doc: routes: path_patterns: # an array of regexps - ^/api documentation: paths: /api/login_check: ... /api/refresh_token: …
dom
  • 325
  • 2
  • 15
3
votes
1 answer

Nelmio ApiDoc 3.0 - exclude section from SwaggerUI

I want to exclude section "default" from SwaggerUI - in there I keep routes that I do not want to expose. I know that in version 2.x of Nelmio Apidoc there was a parameter called exclude_sections in config.yml - how can I do that with 3.0 beta…
Karol Gącik
  • 31
  • 1
  • 3
1
2 3 4 5 6 7 8