1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-03-23 00:16:25 +01:00

chore: type our path parameters when they are numbers (#4471)

Path types in our openapi are inferred as string (which is a sensible
default). But we can be more specific and provide the right type for
each parameter. This is one example of how we can do that
This commit is contained in:
Gastón Fournier 2024-08-21 13:01:00 +02:00 committed by GitHub
parent df73c65073
commit 45de8ceae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -363,6 +363,15 @@ export default class UserAdminController extends Controller {
description:
'Only the explicitly specified fields get updated.',
requestBody: createRequestSchema('updateUserSchema'),
parameters: [
{
name: 'id',
in: 'path',
schema: {
type: 'integer',
},
},
],
responses: {
200: createResponseSchema('createUserResponseSchema'),
...getStandardResponses(400, 401, 403, 404),