mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +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:
		
							parent
							
								
									df73c65073
								
							
						
					
					
						commit
						45de8ceae0
					
				| @ -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), | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user