Skip to content

Commit

Permalink
feat: define new api andpoints for draft messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mebo4b committed Oct 29, 2020
1 parent bf91dc8 commit fb39ee2
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 1 deletion.
66 changes: 65 additions & 1 deletion api/messageservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,71 @@ paths:
description: INTERNAL SERVER ERROR - server encountered unexpected condition
security:
- Bearer: []
x-codegen-request-body-name: Message

/messages/draft:
post:
tags:
- message-controller
summary: 'Save a draft message'
operationId: saveDraftMessage
parameters:
- name: RCGroupId
in: header
required: true
schema:
type: string
requestBody:
description: Draft message to be saved
content:
'application/json':
schema:
type: string
required: true
responses:
200:
description: OK - successfull operation
201:
description: CREATED - message was successfully created
400:
description: BAD REQUEST - invalid/incomplete request or body object
401:
description: UNAUTHORIZED - no/invalid Keycloak token
403:
description: FORBIDDEN - no/invalid role/authorization
500:
description: INTERNAL SERVER ERROR - server encountered unexpected condition
security:
- Bearer: []
get:
tags:
- message-controller
summary: 'Get a draft message by user and rocket chat group id'
operationId: findDraftMessage
parameters:
- name: RCGroupId
in: header
required: true
schema:
type: string
responses:
200:
description: OK - successfull operation
content:
'application/json':
schema:
type: string
204:
description: NO CONTENT - no messages available
400:
description: BAD REQUEST - invalid/incomplete request or body object
401:
description: UNAUTHORIZED - no/invalid Keycloak token
403:
description: FORBIDDEN - no/invalid role/authorization
500:
description: INTERNAL SERVER ERROR - server encountered unexpected condition
security:
- Bearer: []

components:
schemas:
Expand Down
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,30 @@
<version>1.8.3</version>
</dependency>

<!-- Liquibase -->
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.6.3</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.6.3</version>
</dependency>

<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.3.0</version>
</dependency>

<!-- Test scope dependencies -->
<dependency>
<groupId>com.h2database</groupId>
Expand Down

0 comments on commit fb39ee2

Please sign in to comment.