diff --git a/nerm/openapi.yaml b/nerm/openapi.yaml index 5d87644c..7802693d 100644 --- a/nerm/openapi.yaml +++ b/nerm/openapi.yaml @@ -67,6 +67,9 @@ paths: $ref: "./paths/profile_types.yaml" /profile_types/{id}: $ref: "./paths/profile_types_id.yaml" +# Profile Type Roles + /profile_type_roles: + $ref: "./paths/profile_type_roles.yaml" # Profiles /profile: $ref: "./paths/profile.yaml" diff --git a/nerm/paths/profile_type_roles.yaml b/nerm/paths/profile_type_roles.yaml new file mode 100644 index 00000000..a2c8ef6e --- /dev/null +++ b/nerm/paths/profile_type_roles.yaml @@ -0,0 +1,15 @@ +post: + summary: Create a profile type role + description: This endpoint can create a profile type role. NOTE- The ability to toggle Allow/Block is done through the Profile Type + operationId: createProfileTypeRole + tags: + - profile type roles + requestBody: + $ref: "../requestBodies/POST/ProfileTypeRoles.yaml" + responses: + '200': + $ref: "../responses/ProfileTypeRoles.yaml" + '400': + $ref: "../responses/400.yaml" + '500': + $ref: "../responses/500.yaml" \ No newline at end of file diff --git a/nerm/requestBodies/POST/ProfileTypeRoles.yaml b/nerm/requestBodies/POST/ProfileTypeRoles.yaml new file mode 100644 index 00000000..66721c10 --- /dev/null +++ b/nerm/requestBodies/POST/ProfileTypeRoles.yaml @@ -0,0 +1,9 @@ +required: true +content: + application/json: + schema: + type: object + properties: + form: + type: object + $ref: "../../schemas/POST/ProfileTypeRoles.yaml" \ No newline at end of file diff --git a/nerm/responses/ProfileTypeRoles.yaml b/nerm/responses/ProfileTypeRoles.yaml new file mode 100644 index 00000000..a86557f6 --- /dev/null +++ b/nerm/responses/ProfileTypeRoles.yaml @@ -0,0 +1,9 @@ +description: Expected response to a valid request +content: + application/json: + schema: + type: object + properties: + form: + type: object + $ref: '../schemas/GET/ProfileTypeRoles.yaml' \ No newline at end of file diff --git a/nerm/schemas/GET/ProfileTypeRoles.yaml b/nerm/schemas/GET/ProfileTypeRoles.yaml new file mode 100644 index 00000000..bd45baec --- /dev/null +++ b/nerm/schemas/GET/ProfileTypeRoles.yaml @@ -0,0 +1,14 @@ +type: object +properties: + profile_type_id: + type: string + description: The id of the profile type + example: 2eb5773f-2486-452f-bdb3-796133b30862 + role_id: + type: string + description: The id of the role + example: 2eb5773f-2486-452f-bdb3-796133b30862 + id: + type: string + description: The id of the profile type role + example: 2e06b876-f456-473d-bd65-b6435e0b6b2d \ No newline at end of file diff --git a/nerm/schemas/POST/ProfileTypeRoles.yaml b/nerm/schemas/POST/ProfileTypeRoles.yaml new file mode 100644 index 00000000..b1d6fad4 --- /dev/null +++ b/nerm/schemas/POST/ProfileTypeRoles.yaml @@ -0,0 +1,11 @@ +type: object +properties: + profile_type_id: + type: string + description: The id of the profile type + example: 2eb5773f-2486-452f-bdb3-796133b30862 + role_id: + type: string + description: The id of the role + example: 2eb5773f-2486-452f-bdb3-796133b30862 + \ No newline at end of file