Creating documentation
This commit is contained in:
parent
faa9a5e9d5
commit
d003f67273
12
README.md
Normal file
12
README.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Promiscuity
|
||||||
|
|
||||||
|
## Microservices
|
||||||
|
- Auth Microservice Swagger: https://pauth.ranaze.com/swagger/index.html
|
||||||
|
- Character Microservice Swagger: https://pchar.ranaze.com/swagger/index.html
|
||||||
|
- Microservices README: microservices/README.md
|
||||||
|
|
||||||
|
## Test users
|
||||||
|
- `SUPER/SUPER` - Super User
|
||||||
|
- `test1/test1` - Super User
|
||||||
|
- `test3/test3` - User
|
||||||
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
Auth Microservice swagger is accessible at https://pauth.ranaze.com/swagger/index.html
|
|
||||||
Character Microservice swagger is accessible at https://pchar.ranaze.com/swagger/index.html
|
|
||||||
|
|
||||||
Test Users:
|
|
||||||
SUPER/SUPER - Super User
|
|
||||||
test1/test1 - Super User
|
|
||||||
test3/test3 - User
|
|
||||||
|
|
||||||
49
microservices/AuthApi/DOCUMENTS.md
Normal file
49
microservices/AuthApi/DOCUMENTS.md
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# AuthApi document shapes
|
||||||
|
|
||||||
|
This service expects JSON request bodies for its auth endpoints and stores user
|
||||||
|
documents in MongoDB.
|
||||||
|
|
||||||
|
Inbound JSON documents
|
||||||
|
- RegisterRequest (`POST /api/auth/register`)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"username": "string",
|
||||||
|
"password": "string",
|
||||||
|
"email": "string (optional)"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- LoginRequest (`POST /api/auth/login`)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"username": "string",
|
||||||
|
"password": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- RefreshRequest (`POST /api/auth/refresh`)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"username": "string",
|
||||||
|
"refreshToken": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- ChangeRoleRequest (`POST /api/auth/role`)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"username": "string",
|
||||||
|
"newRole": "USER | SUPER"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Stored documents (MongoDB)
|
||||||
|
- User
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string (ObjectId)",
|
||||||
|
"username": "string",
|
||||||
|
"passwordHash": "string",
|
||||||
|
"role": "USER | SUPER",
|
||||||
|
"email": "string (optional)",
|
||||||
|
"refreshToken": "string (optional)",
|
||||||
|
"refreshTokenExpiry": "string (optional, ISO-8601 datetime)"
|
||||||
|
}
|
||||||
|
```
|
||||||
12
microservices/AuthApi/README.md
Normal file
12
microservices/AuthApi/README.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# AuthApi
|
||||||
|
|
||||||
|
## Document shapes
|
||||||
|
See `DOCUMENTS.md` for request payloads and stored document shapes.
|
||||||
|
|
||||||
|
## Endpoints
|
||||||
|
- `POST /api/auth/register` Register a new user.
|
||||||
|
- `POST /api/auth/login` Issue access and refresh tokens.
|
||||||
|
- `POST /api/auth/refresh` Refresh an access token.
|
||||||
|
- `POST /api/auth/logout` Revoke the current access token.
|
||||||
|
- `POST /api/auth/role` Update a user's role (SUPER only).
|
||||||
|
- `GET /api/auth/users` List users (SUPER only).
|
||||||
23
microservices/CharacterApi/DOCUMENTS.md
Normal file
23
microservices/CharacterApi/DOCUMENTS.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# CharacterApi document shapes
|
||||||
|
|
||||||
|
This service expects JSON request bodies for character creation and stores
|
||||||
|
character documents in MongoDB.
|
||||||
|
|
||||||
|
Inbound JSON documents
|
||||||
|
- CreateCharacterRequest (`POST /api/characters`)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Stored documents (MongoDB)
|
||||||
|
- Character
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string (ObjectId)",
|
||||||
|
"ownerUserId": "string",
|
||||||
|
"name": "string",
|
||||||
|
"createdUtc": "string (ISO-8601 datetime)"
|
||||||
|
}
|
||||||
|
```
|
||||||
9
microservices/CharacterApi/README.md
Normal file
9
microservices/CharacterApi/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# CharacterApi
|
||||||
|
|
||||||
|
## Document shapes
|
||||||
|
See `DOCUMENTS.md` for request payloads and stored document shapes.
|
||||||
|
|
||||||
|
## Endpoints
|
||||||
|
- `POST /api/characters` Create a character.
|
||||||
|
- `GET /api/characters` List characters for the current user.
|
||||||
|
- `DELETE /api/characters/{id}` Delete a character owned by the current user.
|
||||||
29
microservices/LocationsApi/DOCUMENTS.md
Normal file
29
microservices/LocationsApi/DOCUMENTS.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# LocationsApi document shapes
|
||||||
|
|
||||||
|
This service expects JSON request bodies for location creation and updates and
|
||||||
|
stores location documents in MongoDB.
|
||||||
|
|
||||||
|
Inbound JSON documents
|
||||||
|
- CreateLocationRequest (`POST /api/locations`)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- UpdateLocationRequest (`PUT /api/locations/{id}`)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Stored documents (MongoDB)
|
||||||
|
- Location
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string (ObjectId)",
|
||||||
|
"ownerUserId": "string",
|
||||||
|
"name": "string",
|
||||||
|
"createdUtc": "string (ISO-8601 datetime)"
|
||||||
|
}
|
||||||
|
```
|
||||||
10
microservices/LocationsApi/README.md
Normal file
10
microservices/LocationsApi/README.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# LocationsApi
|
||||||
|
|
||||||
|
## Document shapes
|
||||||
|
See `DOCUMENTS.md` for request payloads and stored document shapes.
|
||||||
|
|
||||||
|
## Endpoints
|
||||||
|
- `POST /api/locations` Create a location (SUPER only).
|
||||||
|
- `GET /api/locations` List locations for the current user.
|
||||||
|
- `DELETE /api/locations/{id}` Delete a location (SUPER only).
|
||||||
|
- `PUT /api/locations/{id}` Update a location name (SUPER only).
|
||||||
@ -1,2 +1,12 @@
|
|||||||
# micro-services
|
# micro-services
|
||||||
|
|
||||||
|
## Document shapes
|
||||||
|
- AuthApi: `AuthApi/DOCUMENTS.md` (auth request payloads and user document shape)
|
||||||
|
- CharacterApi: `CharacterApi/DOCUMENTS.md` (character create payload and stored document)
|
||||||
|
- LocationsApi: `LocationsApi/DOCUMENTS.md` (location create/update payloads and stored document)
|
||||||
|
|
||||||
|
## Service READMEs
|
||||||
|
- AuthApi: `AuthApi/README.md`
|
||||||
|
- CharacterApi: `CharacterApi/README.md`
|
||||||
|
- LocationsApi: `LocationsApi/README.md`
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user