Skip to content

Commit

Permalink
feat: May be slightly off, added new user and status endpoints.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawsson committed Oct 27, 2023
1 parent 0f12d05 commit 1f73d02
Show file tree
Hide file tree
Showing 12 changed files with 183 additions and 92 deletions.
7 changes: 6 additions & 1 deletion Writerside/flyte.tree
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@

<toc-element toc-title="Users Endpoint">

<toc-element topic="Get-User.md"/>
<toc-element topic="Post-User.md"/>
<toc-element topic="Patch-User.md"/>
<toc-element topic="Delete-User.md"/>
</toc-element>

<toc-element toc-title="Status Endpoints">
<toc-element topic="Get-Flyte-Status.md"/>
<toc-element topic="Get-Flyte-Services-Status.md"/>
<toc-element topic="Update-Service.md"/>
</toc-element>

</toc-element>
Expand Down
2 changes: 1 addition & 1 deletion Writerside/topics/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You will find all the topics in the left sidebar. These topics are organized in
<td>Documentation has been deployed publicly</td>
</tr>
<tr>
<td><a href="Get-Flyte-Status.md">Flyte <code>/status</code> Endpoints Added</a></td>
<td><a href="Get-Flyte-Services-Status.md">Flyte <code>/status</code> Endpoints Added</a></td>
<td>
<list>
<li>added the <code>status</code> field</li>
Expand Down
154 changes: 154 additions & 0 deletions Writerside/topics/flyte/flyteapi/endpoints/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
openapi: 3.0.1
info:
title: Flyte API
description: API description in Markdown.
version: 0.0.1
servers:
- url: 'https://api.flyte.gg/v1'
paths:
/users/{user-id}:
get:
summary: Get user by ID
description: Get user by ID
parameters:
- name: user-id
in: path
description: ID of user to return
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'401':
description: Unauthorized
post:
summary: Update user
description: Update user
parameters:
- name: user-id
in: path
description: ID of user to return
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'201':
description: Created
'401':
description: Unauthorized
patch:
summary: Update user
description: Update user
parameters:
- name: user-id
in: path
description: ID of user to return
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'202':
description: Accepted
'401':
description: Unauthorized
delete:
summary: Delete user
description: Delete user
parameters:
- name: user-id
in: path
description: ID of user to return
required: true
schema:
type: string
responses:
'202':
description: Accepted
'401':
description: Unauthorized

/status:
get:
summary: View status of all Flyte services.
description: View status of all Flyte services in one endpoint.
responses:
'200':
description: OK (Returns Array of Objects)
content:
application/json:
schema:
$ref: '#/components/schemas/StatusCheck'
'401':
description: Unauthorized

post:
summary: Update status of a Flyte service.
description: Update status of a Flyte service.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StatusCheck'

responses:
'201':
description: Created
'401':
description: Unauthorized

components:
schemas:
User:
type: object
properties:
id:
type: number
role:
type: string
accountType:
type: string
involvedProjects:
type: object # HashMap<String, String>
additionalProperties:
type: string


StatusCheck:
type: array
properties:
id:
type: string
name:
type: string
healthy:
type: boolean


securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT

security:
- bearerAuth: [ ]


Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Get Status of Flyte Services

<api-endpoint openapi-path="../openapi.yaml" endpoint="/status" method="get"/>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Update Status of Flyte Services

<api-endpoint openapi-path="../openapi.yaml" endpoint="/status" method="post"/>
86 changes: 0 additions & 86 deletions Writerside/topics/flyte/flyteapi/endpoints/status/openapi.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Delete User By Id

<api-endpoint openapi-path="../openapi.yaml" endpoint="/users/{user-id}" method="delete"/>

3 changes: 3 additions & 0 deletions Writerside/topics/flyte/flyteapi/endpoints/users/Get-User.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Get User By ID

<api-endpoint openapi-path="../openapi.yaml" endpoint="/users/{user-id}" method="get"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Modify User By Id

<api-endpoint openapi-path="../openapi.yaml" endpoint="/users/{user-id}" method="patch"/>

4 changes: 4 additions & 0 deletions Writerside/topics/flyte/flyteapi/endpoints/users/Post-User.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Update User By ID

<api-endpoint openapi-path="../openapi.yaml" endpoint="/users/{user-id}" method="post"/>

1 change: 1 addition & 0 deletions Writerside/topics/flyte/other/scripts/Ptero-Build-Flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ shadowJar {

#### For Maven
To do this with maven, you can add this to your build inside pom.xml

```xml
<build>
<finalName>example</finalName>
Expand Down

0 comments on commit 1f73d02

Please sign in to comment.