DarkaOnLine / L5-Swagger

OpenApi or Swagger integration to Laravel
https://github.com/DarkaOnLine/L5-Swagger
MIT License
2.64k stars 394 forks source link

Simple upload and download csv file examples #433

Closed erickneverson closed 2 years ago

erickneverson commented 2 years ago

Description:

Looking for simple examples to upload a single csv file and download a single csv file.

Steps To Reproduce:

Tried looking at official swagger docs and converting the yaml there to json but no luck.

/**
     * @OA\Get(
     *      path="/download/{id}/{name}",
     *      operationId="getCSVFile",
     *      tags={"Download"},
     *      summary="Download csv for job and name specified",
     *      description="Returns csv file. name = original|success|errors",
     *      produces=("application/csv"),
     *      @OA\Response(
     *          response=200,
     *          description="successful operation",
     *          @OA\Schema(
     *              type="file"
     *          )
     *       ),
     *      security={
     *         {"BearerToken": {}}
     *      },
     * )
     */

Sorry if this is the wrong area for such questions.

DarkaOnLine commented 2 years ago

Yeah, you should try finding the answer for this or raising an issue in swagger-php repo, as this package is responsible for parsing annotations