Skip to content

Commit

Permalink
Add open api specifications
Browse files Browse the repository at this point in the history
  • Loading branch information
MDeLuise authored and Coduz committed Feb 6, 2023
1 parent 352fb94 commit cab35ce
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rest-api/resources/src/main/resources/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@ paths:
$ref: './user/user-scopeId-userId-mfa.yaml#/paths/~1{scopeId}~1users~1{userId}~1mfa'
/{scopeId}/users/{userId}/mfa/disableTrust:
$ref: './user/user-scopeId-userId-mfa-disableTrust.yaml#/paths/~1{scopeId}~1users~1{userId}~1mfa~1disableTrust'
### User Credentials ###
/{scopeId}/user/credentials/password:
$ref: './userCredentials/user-credentials-scopeId.yaml#/paths/~1{scopeId}~1user~1credentials~1password'

components:
parameters:
Expand Down Expand Up @@ -923,6 +926,9 @@ components:
$ref: './user/user.yaml#/components/schemas/mfaOption'
mfaOptionCreator:
$ref: './user/user.yaml#/components/schemas/mfaOptionCreator'
### User Credentials Entities ###
passwordChangeRequest:
$ref: './userCredentials/userCredentials.yaml#/components/schemas/passwordChangeRequest'
requestBodies:
kapuaQuery:
description: An object to specify Query options
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
openapi: 3.0.2

info:
title: Everyware Cloud REST API - User Credentials
version: '1.0'
contact:
name: Eurotech
url: https://www.eurotech.com

paths:

/{scopeId}/user/credentials/password:
post:
tags:
- User Credentials
summary: Change the user password
operationId: provisionRequestExecutionCount
parameters:
- $ref: '../openapi.yaml#/components/parameters/scopeId'
requestBody:
content:
application/json:
schema:
$ref: '../openapi.yaml#/components/schemas/passwordChangeRequest'
responses:
200:
description: The details of the updated Credential
content:
application/json:
schema:
$ref: '../credential/credential.yaml#/components/schemas/credential'
401:
$ref: '../openapi.yaml#/components/responses/unauthenticated'
403:
$ref: '../openapi.yaml#/components/responses/subjectUnauthorized'
500:
$ref: '../openapi.yaml#/components/responses/kapuaError'
description: Change logged user password
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
openapi: 3.0.2

info:
title: Everyware Cloud REST API - User Credentials
version: '1.0'
contact:
name: Eurotech
url: https://www.eurotech.com

paths: {}

components:
schemas:
passwordChangeRequest:
allOf:
- description: Represent a request for changing the user password
type: object
properties:
oldPassword:
type: string
newPassword:
type: string
example:
oldPassword: "Welcome1234!"
newPassword: "NewWelcome1234!"

0 comments on commit cab35ce

Please sign in to comment.