rule book ui

This commit is contained in:
Sirttas
2026-05-24 13:39:35 +02:00
parent a1dbe41b6c
commit 4b39d491d2
15 changed files with 524 additions and 17 deletions
+365
View File
@@ -0,0 +1,365 @@
openapi: 3.1.0
info:
title: OpenAPI definition
version: v0
servers:
- url: http://localhost:8080
description: Generated server url
paths:
/ledgers/main/{ledgerId}:
put:
tags:
- ledger-controller
operationId: updateMainLedger
parameters:
- name: ledgerId
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateMainLedgerRequest"
required: true
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
$ref: "#/components/schemas/MainLedgerResponse"
/ledgers/combined/{ledgerId}:
put:
tags:
- ledger-controller
operationId: updateCombinedLedger
parameters:
- name: ledgerId
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateCombinedLedgerRequest"
required: true
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
$ref: "#/components/schemas/CombinedLedgerResponse"
/ledgers/main:
post:
tags:
- ledger-controller
operationId: createMainLedger
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateMainLedgerRequest"
required: true
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
$ref: "#/components/schemas/MainLedgerResponse"
/ledgers/combined:
post:
tags:
- ledger-controller
operationId: createCombinedLedger
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateCombinedLedgerRequest"
required: true
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
$ref: "#/components/schemas/CombinedLedgerResponse"
/activity/fetch/{characterId}:
post:
tags:
- activity-controller
operationId: fetchNewActivitiesForCharacter
parameters:
- name: characterId
in: path
required: true
schema:
type: integer
format: int64
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
/ledgers:
get:
tags:
- ledger-controller
operationId: findAll
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
type: array
items:
oneOf:
- $ref: "#/components/schemas/CombinedLedgerResponse"
- $ref: "#/components/schemas/MainLedgerResponse"
/ledgers/{ledgerId}:
get:
tags:
- ledger-controller
operationId: findById
parameters:
- name: ledgerId
in: path
required: true
schema:
type: string
format: uuid
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
oneOf:
- $ref: "#/components/schemas/CombinedLedgerResponse"
- $ref: "#/components/schemas/MainLedgerResponse"
/characters:
get:
tags:
- character-controller
operationId: getCharacters
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
type: array
items:
$ref: "#/components/schemas/CharacterResponse"
/characters/{characterId}/rule-book:
get:
tags:
- rule-book-controller
operationId: findByCharacterId
parameters:
- name: characterId
in: path
required: true
schema:
type: integer
format: int64
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
$ref: "#/components/schemas/RuleBookResponse"
components:
schemas:
UpdateMainLedgerRequest:
type: object
properties:
name:
type: string
required:
- name
MainLedgerResponse:
allOf:
- $ref: "#/components/schemas/LedgerResponse"
- type: object
properties:
ledgerId:
type: string
format: uuid
name:
type: string
balance:
type: number
type:
type: string
enum:
- MAIN
required:
- balance
- ledgerId
- name
UpdateCombinedLedgerRequest:
type: object
properties:
name:
type: string
memberLedgerIds:
type: array
items:
type: string
format: uuid
required:
- memberLedgerIds
- name
CombinedLedgerResponse:
allOf:
- $ref: "#/components/schemas/LedgerResponse"
- type: object
properties:
ledgerId:
type: string
format: uuid
name:
type: string
balance:
type: number
memberLedgerIds:
type: array
items:
type: string
format: uuid
type:
type: string
enum:
- COMBINED
required:
- balance
- ledgerId
- memberLedgerIds
- name
CreateMainLedgerRequest:
type: object
properties:
name:
type: string
required:
- name
CreateCombinedLedgerRequest:
type: object
properties:
name:
type: string
memberLedgerIds:
type: array
items:
type: string
format: uuid
required:
- memberLedgerIds
- name
LedgerResponse:
type: object
discriminator:
propertyName: type
properties:
type:
type: string
enum:
- MAIN
- COMBINED
CharacterResponse:
type: object
properties:
characterId:
type: integer
format: int64
name:
type: string
required:
- characterId
- name
RuleBookResponse:
type: object
properties:
characterId:
type: integer
format: int64
ruleSets:
type: object
additionalProperties:
$ref: "#/components/schemas/RuleSetResponse"
required:
- characterId
- ruleSets
RuleResponse:
type: object
properties:
rate:
type: string
enum:
- NONE
- VALUE
- JITA_BUY
- JITA_SELL
- EVE_ESTIMATE
fromLedgerId:
type: string
format: uuid
toLedgerId:
type: string
format: uuid
required:
- rate
RuleSetResponse:
type: object
properties:
rules:
type: array
items:
$ref: "#/components/schemas/RuleResponse"
required:
- rules