Open API Docs not generated or bad URL #202
Unanswered
vlastimilvasek
asked this question in
Q&A
Replies: 2 comments
-
Hi, Open API Doc are all embedded in code, u can find them in <?php
namespace Modules\V3\Http\Controllers;
class ArticleController extends DefaultController
{
// >>>props>>>
// <<<props<<<
// >>>methods>>>
/**
* @OA\Get(
* path="/v3/article",
* summary="Get Articles ",
* tags={"ArticleController"},
* @OA\Parameter(
* in="query",
* name="include",
* required=false,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="query",
* name="page",
* required=false,
* @OA\Schema(
* type="integer",
* ),
* ),
* @OA\Parameter(
* in="query",
* name="limit",
* required=false,
* @OA\Schema(
* type="integer",
* ),
* ),
* @OA\Parameter(
* in="query",
* name="sort",
* required=false,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="query",
* name="data",
* required=false,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="query",
* name="filter",
* required=false,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="query",
* name="order_by",
* required=false,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Response(
* response="200",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Get(
* path="/v3/article/{id}",
* summary="Get Article",
* tags={"ArticleController"},
* @OA\Parameter(
* in="query",
* name="include",
* required=false,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="query",
* name="data",
* required=false,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Response(
* response="200",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Post(
* path="/v3/article",
* summary="Create Article",
* tags={"ArticleController"},
* @OA\Response(
* response="201",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Patch(
* path="/v3/article/{id}",
* summary="Update Article",
* tags={"ArticleController"},
* @OA\Response(
* response="200",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Delete(
* path="/v3/article/{id}",
* summary="Delete Article",
* tags={"ArticleController"},
* @OA\Response(
* response="204",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Get(
* path="/v3/article/{id}/{related}",
* summary="Get Article related objects",
* tags={"ArticleController"},
* @OA\Parameter(
* in="query",
* name="data",
* required=false,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="path",
* name="id",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="path",
* name="related",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Response(
* response="200",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Get(
* path="/v3/article/{id}/relationships/{relations}",
* summary="Get Article relations objects",
* tags={"ArticleController"},
* @OA\Parameter(
* in="query",
* name="data",
* required=false,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="path",
* name="id",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="path",
* name="relations",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Response(
* response="200",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Post(
* path="/v3/article/{id}/relationships/{relations}",
* summary="Create Article relation object",
* tags={"ArticleController"},
* @OA\Parameter(
* in="path",
* name="id",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="path",
* name="relations",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Response(
* response="201",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Patch(
* path="/v3/article/{id}/relationships/{relations}",
* summary="Update Article relation object",
* tags={"ArticleController"},
* @OA\Parameter(
* in="path",
* name="id",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="path",
* name="relations",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Response(
* response="200",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Delete(
* path="/v3/article/{id}/relationships/{relations}",
* summary="Delete Article relation object",
* tags={"ArticleController"},
* @OA\Parameter(
* in="path",
* name="id",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Parameter(
* in="path",
* name="relations",
* required=true,
* @OA\Schema(
* type="string",
* ),
* ),
* @OA\Response(
* response="204",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Post(
* path="/v3/article/bulk",
* summary="Create Article bulk",
* tags={"ArticleController"},
* @OA\Response(
* response="201",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Patch(
* path="/v3/article/bulk",
* summary="Update Article bulk",
* tags={"ArticleController"},
* @OA\Response(
* response="200",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
/**
* @OA\Delete(
* path="/v3/article/bulk",
* summary="Delete Article bulk",
* tags={"ArticleController"},
* @OA\Response(
* response="204",
* description="successful operation",
* @OA\MediaType(
* mediaType="application/vnd.api+json"
* ),
* ),
* )
*/
// <<<methods<<<
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
To visualize documentation you need this tool - https://github.com/swagger-api/swagger-ui and nodejs server running on back-end. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I can not find generated Open APi Docs. URL mentioned in YT video (api/documentation) does work for me.
What am I missing?
Thank you for help.
Beta Was this translation helpful? Give feedback.
All reactions