Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge endpoint parameters specification if OpenApi annotation is provided #199

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

besir
Copy link
Contributor

@besir besir commented Jun 19, 2023

Example:

	/**
	 * @Path("/")
	 * @Method("GET")
	 * @Tag(name="@authenticated", value="User")
	 *
	 * @RequestParameters({
	 *     @RequestParameter(name="filters", in="query", required=false, description="Filters", type="object"),
	 * })
	 *
	 * @RequestBody("\App\Api\Entity\Request\Employee\EmployeeList")
	 *
	 *
	 * @OpenApi("
	 *    summary: Get employees
	 *    operationId: getEmployees
	 *    tags:
	 *       - Employee
	 *    security:
	 *       - BearerAuth: []
	 *    parameters:
	 *     - in: query
	 *       name: filters
	 *       schema:
	 *         type: object
	 *         items:
	 *           type: string
	 *       style: deepObject
	 *       example: {'foo': 'bar'}
	 *    responses:
	 *       200:
	 *           description: Emploeey list
	 *           content:
	 *               application/json:
	 *                   example:
	 *       default:
	 *           description: unexpected error
	 * ")
     */
	public function getEmployees(ApiRequest $request, ApiResponse $response): ApiResponse
	{
		//...

		return $response->writeJsonBody([]);
	}
image

@besir besir force-pushed the merge-endpoint-parameters branch 4 times, most recently from b282b98 to 1c3b3f8 Compare June 19, 2023 15:25
@besir besir force-pushed the merge-endpoint-parameters branch from 1c3b3f8 to b3f9ac1 Compare June 28, 2023 12:08
@f3l1x f3l1x merged commit 596ac1e into contributte:master Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants