sailpoint-oss / api-specs

This repo houses the API specifications for all SailPoint services.
MIT License
10 stars 17 forks source link

NERM - required #52

Open yannick-beot-sp opened 8 months ago

yannick-beot-sp commented 8 months ago

As stated in the OpenAPI specs (cf. https://swagger.io/docs/specification/data-models/data-types/#required)

You can specify the required properties in the required list

However required is used at the property level "Swagger 2.0" style. Example: https://github.com/sailpoint-oss/api-specs/blob/053928aec05b75466ea7689c32c3fb5c3039619f/nerm/schemas/POST/User.yaml#L5

As such, the object should be described as:

type: object
required: 
  - name
  - email
  - status
  - login
properties:
  name:
    type: string
    description: The user name
    example: Bob
  email:
    type: string
    format: email
    description: The user email
    example: test@sailpoint.com
  type:
    type: string
    enum: ['NeprofileUser', 'NeaccessUser']
    default: NeprofileUser
    description: The user type
    example: NeprofileUser
  profile_id:
    type: string
    format: uuid
    description: The user profile id
    example: db6f8e8b-65c2-47d5-a0db-90bcc4e9df9e
  title:
    type: string
    description: The user description
    example: my_user_title
  status:
    type: string
    enum: [Active, Disabled]
    description: The user status
    example: Active
  login:
    type: string
    description: The user login
    example: my_user  
  group_strings:
    type: string
    description: The user group strings
    example: "Administrator_group,Developer_group"