mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	## What This adds openapi documentation for the Auth tagged operations and connected schemas. ## Discussion points Our user schema seems to be exposing quite a bit of internal fields, I flagged the isApi field as deprecated, I can imagine quite a few of these fields also being deprecated to prepare for removal in next major version, but I was unsure which ones were safe to do so with. ## Observation We have some technical debt around the shape of the schema we're claiming we're returning and what we actually are returning. I believe @gastonfournier also observed this when we turned on validation for our endpoints. --------- Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
		
			
				
	
	
		
			21 lines
		
	
	
		
			685 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			685 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { FromSchema } from 'json-schema-to-ts';
 | 
						|
 | 
						|
export const validatePasswordSchema = {
 | 
						|
    $id: '#/components/schemas/validatePasswordSchema',
 | 
						|
    type: 'object',
 | 
						|
    additionalProperties: false,
 | 
						|
    required: ['password'],
 | 
						|
    description:
 | 
						|
        'Used to validate passwords obeying [Unleash password guidelines](https://docs.getunleash.io/reference/deploy/securing-unleash#password-requirements)',
 | 
						|
    properties: {
 | 
						|
        password: {
 | 
						|
            description: 'The password to validate',
 | 
						|
            type: 'string',
 | 
						|
            example: 'hunter2',
 | 
						|
        },
 | 
						|
    },
 | 
						|
    components: {},
 | 
						|
} as const;
 | 
						|
 | 
						|
export type ValidatePasswordSchema = FromSchema<typeof validatePasswordSchema>;
 |