Coder Social home page Coder Social logo

ovac / idoc Goto Github PK

View Code? Open in Web Editor NEW
166.0 3.0 38.0 229 KB

📒📚Generate beautiful interactive documentation and Open-API 3.0 spec file from your existing Laravel app.

Home Page: https://www.ovac4u.com/idoc

License: MIT License

PHP 89.33% Blade 10.67%
laravel open api openapi ovac4u ovac laravel-api-documentation api-documentation open-api-v3 open-api-specification laravel-documentation-generator documentation generator docs

idoc's Issues

Group description

Hi,

I would like to write a description to my endpoint group usig some like:

/**
 * Lorem ipsum dolor, sit amet consectetur adipisicing elit. 
 * 
 * @group Lorem
 * 
 */

Nowadays this description is not shown in documentation generated

C#

how to create and implementation of C# language in laravel...

BodyParams type arrays or objects

Hi,

I'd like to use arrays or objects as @BodyParam but it not identify dot notation.

I mean something like:

 * @bodyParam  my_object object required.
 * Some object
 * 
 * @bodyParam  my_object.item string required 
 * Item in the object.

And

 * @bodyParam  my_array array 
 * Some array.
 * 
 * @bodyParam  my_array.* integer 
 *  Items in the array.

Even

 * @bodyParam  my_set array 
 * Some set
 * 
 * @bodyParam  my_set.*.item string
 * Object element within set

Support laravel 8?

System info:

PHP: 8.0
Laravel: 8.x

I get some error:

ovac/idoc v1.3.0 requires illuminate/routing 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 -> found illuminate/routing[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] b
ut these were not loaded, likely because it conflicts with another require.

CSRF token mismatch.

I keep getting "CSRF token mismatch." error even I try testing the api on idoc with Laravel Sanctum.

Parser ignoring responses

Good afternoon, first of all let me thank you for this amazing package!

I am trying to add the responses to the documentation, but once generated I only get the default 200 and nothing else.

/** * @response 200 { * "status": "success", * "message": "Your request was successfully created" * } * * @response 500 { * "status": "error", * "message": ["Custom error message"] * } */

Do I need to add/change anything?

BodyParams type arrays or objects

Issue based on #19

Previous issue regarding this topic is closed as completed, but I can not find anywhere the example of how to use the said types of array or objects, because as it is decribed in the previous issue, it does not work.

The said types are really needed.

I have noticed, that Redoc can have an array containing object elements. Is there any way to that also? Or are any changes required for that to work?

image

Any of theses examples does not work.

 * @bodyParam  my_object object required.
 * Some object
 * 
 * @bodyParam  my_object.item string required 
 * Item in the object.
 * @bodyParam  my_array array 
 * Some array.
 * 
 * @bodyParam  my_array.* integer 
 *  Items in the array.
 * @bodyParam  my_set array 
 * Some set
 * 
 * @bodyParam  my_set.*.item string
 * Object element within set

image

image

Environment to response generation

Hi,

The environment vars for the API call works only to define specific vars, but if I want to change the whole APP_ENV environment it doesn't work, it still uses the default .env

How can I change the environment?

Wrong authentication method in example using apiKey.

In idoc.php config file, I have this security settings:

    'security' => [
        'apiToken' => [
            'type' => 'apiKey',
            'name' => 'apiToken',
            'in' => 'header',
            'description' => 'Use `apiToken` in the requests.'
        ],
    ],

When I create the docs with php artisan idoc:generate the examples are created with Bearer JWT Token:

curl -X GET -G "http://localhost/api/myapiurl" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJod"

Edit

I tried to use the specification from here: https://spec.openapis.org/oas/v3.1.0#api-key-sample

Error responses

The docs don't show any stated error responses. No matter if the 200 status code is supplied or not (or any positive response).

(#35)

Example:

/*
 * Title 
 *
 * @response {
 *   "status": 200
 * }
 *
 * @response 400 {
 *   "status": 400
 * }
 * @response 404 {
 *   "status": 404
 * }
 * 
 * / 

Outputs:
CleanShot 2023-06-13 at 17 02 34

File support

Hi,

How can I document endpoints with uploading files?

Side menu behavior in Chrome

Redoc generated side menu disappears when scrolling down in latest version of Chrome and group expansion and collapse is inconsistent.

This bug was already reported in redoc Redocly/redoc#1167,

Looks like an deprecated CDN version bug

Laravel 9 support

Could you please update your great tool to make it support the latest Laravel version?

Laravel 10 Dependency Issue

Hi. I tried to use this within my current project using Laravel 10. Running this command:

composer require ovac/idoc

Then this error appeared:

Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update ovac/idoc
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - ovac/idoc[v1.0.0, ..., v1.1.1] require illuminate/routing 5.5.* || 5.6.* || 5.7.* || 5.8.* -> found illuminate/routing[v5.5.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - ovac/idoc v1.2.0 requires illuminate/routing 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 -> found illuminate/routing[v5.5.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require.
    - ovac/idoc v1.3.0 requires illuminate/routing 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 -> found illuminate/routing[v5.5.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6] but these were not loaded, likely because it conflicts with another require.
    - ovac/idoc v1.4.0 requires illuminate/routing 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 || ^8.0 -> found illuminate/routing[v5.5.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
    - ovac/idoc 1.5.0 requires illuminate/routing 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 || ^8.0 || ^9.0 -> found illuminate/routing[v5.5.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.4] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires ovac/idoc * -> satisfiable by ovac/idoc[v1.0.0, ..., 1.5.0].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require ovac/idoc:*" to figure out if any version is installable, or "composer require ovac/idoc:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

May I know how to solve this?
Thanks!

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.