Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
66 views

I'm working on a Laravel API using l5-swagger for documentation. I have two routes: /post/{id}/like /comment/{id}/like Both are handled by the same method defined in a base controller (e.g. ...
Unik6065's user avatar
  • 125
0 votes
0 answers
59 views

I'm using L5-Swagger to document my API in a Laravel application. Let’s consider the following models: Dog Shop Sale (which has foreign keys to both dog_id and shop_id) In my API documentation, I ...
Unik6065's user avatar
  • 125
0 votes
1 answer
269 views

I am using swagger to create an OpenApi documentation. I am switching now to php attributes and phpstan in level 6 complain about missing specific array declaration, which worked totally fine as long ...
Calamity Jane's user avatar
1 vote
1 answer
163 views

I'm trying to use attributes in swagger-php. The intention is to support multiple Content-Type responses with the same API endpoint. Below a minimal code example: #[OA\Get(path: '/myEndpoint')] #[OA\...
Vincent Nikkelen's user avatar
0 votes
1 answer
2k views

Problem I'm trying to use zircote/swagger-php to generate an OpenApi file from PHP-code. For some reason I keep getting the following error: Warning: Skipping unknown La\Product Warning: Required @OA\...
Ramzi Khahil's user avatar
  • 5,106
0 votes
1 answer
453 views

I am using PHP attributes to produce my OpenApi yaml file specfication/documentation and then using Swagger UI to interact with it. I have the following defined which creates the .yaml file without ...
Antevasin's user avatar
  • 183
4 votes
2 answers
5k views

Just learning to use attributes to describe function parameters and responses. I'm trying to describe a response object that returns an array of objects, but so far not a lot of luck using an array, ...
Kees Klomp's user avatar
0 votes
2 answers
549 views

When using the block below to generate swagger documentation: /** * @OA\Get( * path="/api/users", * summary="...", * @OA\Response( * response="200&...
Caio Ladislau's user avatar
0 votes
0 answers
723 views

Locally apache server documentation properly Running but when it deploy the live server then showing error, LOG.error: ErrorException: Multiple @OA\Response() with the same response="200" : ...
Billal Hossain's user avatar
1 vote
1 answer
966 views

I can't find a way to sort the API paths defined in my PHP annotations with zircote/swagger-php, i found nothing in OpenAPI specification nor in swagger-php documentation to achieve this. This related ...
NeyJâh's user avatar
  • 11
0 votes
1 answer
508 views

enter image description here I’m inputting Swagger PHP notation into our API. When I use schemas I’ve created I'm getting a resolver error "Could not resolve reference: undefined”. When I call my ...
Carina George's user avatar
1 vote
2 answers
597 views

Using Swagger-php and the following command, how can I make it show the folders/files it searches so that I can check my excudes actually work? $openapi = \OpenApi\scan('./myfolder', [ 'exclude' =&...
TheStoryCoder's user avatar
1 vote
1 answer
527 views

I generated the array below in PHP and now don't know how to define it using zircote/swagger-php, I would be very grateful if you could help me. PHP array. $arr = [ ['name' => 'foo', 'age' =>...
美丽中国's user avatar
1 vote
0 answers
549 views

I'm stuck when trying to define settings API documentation. Let's say, that in @OA\JsonContent() I need to have two properties - key and value. But properties are strictly defined as key => type ...
Petr Katerinak's user avatar
0 votes
1 answer
303 views

i want to get a get request http://localhost/api/catalog/product/list?filters[filter14][]=0 but in swagger it turns out only how to create two dimensional array input in swagger editor?
Sergei Semenets's user avatar
0 votes
1 answer
3k views

We have php-swagger which generates developer documentation in open api 3.0 format. There was a task - to make OTHER documentation based on the generated api-docs.json, for clients with a limited ...
Basil's user avatar
  • 61
0 votes
1 answer
1k views

I am using DarkaOnLine/L5-Swagger package for project. Here is example annotation /** * @OA\Post( * //annotations etc.. * ) */ public function login(LoginRequest $request): JsonResponse { /...
Alper's user avatar
  • 160
0 votes
1 answer
553 views

Upgraded from Laravel 8 to 9 and I received this message on swagger docs. "Unable to render this definition The provided definition does not specify a valid version field". Please indicate a ...
Alper's user avatar
  • 160
1 vote
0 answers
368 views

I have my API in lumen 8.* As my annotations are getting longer, I want to put all of them into a single or multiple yamls so that my codes get clean. The package that I'm using is https://github.com/...
DJeong's user avatar
  • 11
-1 votes
1 answer
976 views

I'm using OpenAPI 3.0 to document my Symfony API. this is the JSON code that authenticates the user to send requests: "securitySchemes": { "Bearer": { "...
BELARIF's user avatar
2 votes
0 answers
490 views

I'm writing API documentation for my application using Swagger 3.0. My application has some apis that include some middlewares. I want to describe that which api has the middlewares (like parameters ...
simpsons3's user avatar
  • 1,019
0 votes
2 answers
8k views

I have this a project that is using Laravel for the api and swagger for documentation I have this method in my login controller: /** * Handle an incoming authentication request. * * * @OA\Post( ...
DeveloperX's user avatar
1 vote
2 answers
2k views

I'm using zircote/swagger-php for annotations to generate swagger for my php WebApi. I have my generic model HttpResponse, it has 2 common properties (messages and statusCode) but data is generic and ...
Rafael's user avatar
  • 91
0 votes
1 answer
494 views

I'm getting following errors when I run openapi command to generate swagger file. Command #vendor/bin/openapi api/modules/v3/controllers/AbcController.php swagger Notice: Trying to access array ...
cha's user avatar
  • 740
4 votes
8 answers
20k views

I just got into api documentation and tried to use Swagger here is my php file with routes that I want to document: <?php use OpenApi\Annotations as OA; /** * @OA\Info(title="My First API&...
ddruganov's user avatar
  • 1,804
1 vote
2 answers
2k views

If I add this response to my definition: @OA\Response( response="default", description="unexpected error", @OA\JsonContent(ref="#/components/schemas/ErrorModel&...
UrbanwarfareStudios's user avatar
0 votes
3 answers
8k views

I am trying to implement openAPI documentation in a Laravel project. I am using darkaonline/l5-swagger package, which is built on top of swagger-php to generate the documentation. I am facing a ...
Nikolay Naydenov's user avatar
5 votes
1 answer
4k views

I'm trying to specify the following requestBody in swagger (OAS3): { "first_name": "John", "last_name": "Doe", "email": "[email protected]&...
user2191227's user avatar
1 vote
1 answer
1k views

I am using l5-swagger and redocly to display API documentation for a Laravel 8 project. Open API supports: "x-logo": { "url": "path_to_your_logo" }, I have ...
UrbanwarfareStudios's user avatar
1 vote
1 answer
1k views

My form-data consists of an array 'items' which contains details like: items[0][id]:1 items[0][amount]:50 items[1][id]:2 items[1][amount]:25 This is how it looks like in postman. How can I write the ...
Devender Gupta's user avatar
1 vote
1 answer
2k views

I have an endpoint that can return either a single item or a list of items, depending on the parameters passed in (There's no flexibility in the endpoint currently, I am unable to make code changes). ...
Skytiger's user avatar
  • 1,855
0 votes
1 answer
1k views

I'm using zircote/swagger-php to generated API documentation based on OpenApi annotations that I have added to existing code. For the most part it's working fine, but I've noticed one strange bit. I ...
Skytiger's user avatar
  • 1,855
2 votes
1 answer
4k views

I am trying to send an array using swagger. But when I check the array in inspect mode, I notice that the array being send is just a string and is not an array /** * @OA\Post( * path="/...
Lee Soon Fatt's user avatar
0 votes
1 answer
876 views

/** * @SWG\Swagger( * @SWG\Info( * title="My first swagger documented API", * version="1.0.0" * ) * ) */ I tried to write this block in: my base controller - ...
Dmitriy Lysenko's user avatar
1 vote
1 answer
3k views

Background: I have installed composer installed zircote/swagger-php and have installed openapi-generator-cli with apt-get. I am not sure whether or not I am attempting to use these tools correctly, ...
Skytiger's user avatar
  • 1,855
3 votes
0 answers
573 views

I'm running into an issue with the Doctrine annotations used with the zircote/swagger-php library. We're doing some dependency upgrades and the Doctrine proxy generation is failing with the error: ...
tyrnnsrs's user avatar
5 votes
1 answer
2k views

I would love a way to declare some responses that are the same for every endpoint; for example every endpoint will output a 401 if you don't have a proper token, and then there can be another group of ...
Digital Ninja's user avatar
0 votes
1 answer
1k views

I'm on a Laravel build, and updating notations for all my API controller methods from @SWG to @OA. When I hit 'try it out' in the swagger-ui on a create method, I'm able to get it to show (and accept)...
WoodyNaDobhar's user avatar
1 vote
0 answers
709 views

All my api endpoints are pointed to same controller and have difference responses e.g. /api/tags, /api/currencies, /api/countries are pointing to one BaseController Should I write swagger annotations ...
Ramakant Gangwar's user avatar
1 vote
1 answer
814 views

Quick question, im working with swagger-php to annotate my API. The output of the API always has the same basic structure and is being used over several endpoints: [ { "status": "...
DJQ's user avatar
  • 83
2 votes
1 answer
1k views

I am struggling to write a parameter annotation for a field that would have to result as indexed array of integers: voucher_products[0]: 23 voucher_products[1]: 102 voucher_products[2]: 233 I tried ...
aWWW's user avatar
  • 31
0 votes
0 answers
559 views

* @SWG\Get( * path="/settings", * tags={"Settings"}, * operationId="settingsindex", * summary="Get settings.", * @SWG\Response(...
HAIDER KHALIL's user avatar
2 votes
1 answer
1k views

I have written Swagger Annotations for a function in a Controller and I am getting error while generating swagger-ui code. Following is my code for annotation /*** End of Annotation For deleteNote ***/...
user avatar
2 votes
1 answer
4k views

I'm trying to setup Open API 2 (fka swagger) using swagger-php but i haven't been able to find an example of a implementation using annotations with Content-Type: application/x-www-form-urlencoded ...
StacOlem's user avatar
  • 183
3 votes
2 answers
27k views

i'm trying to define some request body example in a file and link this file to the actual request, i saw we can use Swagger $ref to do that Reusing Examples but i can't find the correct L5 Swagger ...
Fadi's user avatar
  • 2,380
1 vote
2 answers
2k views

darkaonline/l5-swagger: 8.0.2 PHP Version: 7.3.13 zircote/swagger-php: 3.1.0 OS: Windows I created a Contract ref object. Now in my ContractController I want to list an array of contracts. How can I ...
Dương Việt Hoàng's user avatar
0 votes
1 answer
532 views

In my case, for a DELETE operation, i will have to pass a body which looks like below. Request body should look like: [ "Vi####1", "Vi####2" ] But when i tried to achieve this, ...
Karthik's user avatar
0 votes
1 answer
3k views

i am using swagger documentation to chow api data, i one of my case i want to get data from database by a specific date, get a day by a $day variable i use a method and working fine in Postman in ...
user avatar
0 votes
0 answers
318 views

I want get data with specific date (timestamp) in database, i use this method and everything fine ! Method: public function getdatabyday() { $p = "zero"; $day = date('Y-m-d ', strtotime($...
user avatar
1 vote
1 answer
2k views

I have a DTO like this: # AppBundle\DTO /** * @OA\Schema( * schema="ProductDto", * type="object", * required={ * "foo", * "...
user3180943's user avatar