Files
gemory/docs/mammon-api.yml
T
2026-05-31 18:19:45 +02:00

570 lines
13 KiB
YAML

openapi: 3.1.0
info:
title: OpenAPI definition
version: v0
servers:
- url: http://localhost:8080
description: Generated server url
paths:
/rule-books/{ruleBookId}:
get:
tags:
- rule-book
operationId: findRuleBookById
parameters:
- name: ruleBookId
in: path
required: true
schema:
type: string
format: uuid
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
$ref: "#/components/schemas/RuleBookResponse"
put:
tags:
- rule-book
operationId: updateRuleBook
parameters:
- name: ruleBookId
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateRuleBookRequest"
required: true
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
$ref: "#/components/schemas/RuleBookResponse"
/ledgers/main/{ledgerId}:
put:
tags:
- ledger
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
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"
/characters/{characterId}/rule-book:
get:
tags:
- character-rule-book
operationId: findCharacterRuleBookByCharacterId
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/CharacterRuleBookResponse"
put:
tags:
- character-rule-book
operationId: setCharacterRuleBookForCharacter
parameters:
- name: characterId
in: path
required: true
schema:
type: integer
format: int64
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/SetCharacterRuleBookRequest"
required: true
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
$ref: "#/components/schemas/CharacterRuleBookResponse"
/rule-books:
get:
tags:
- rule-book
operationId: findAllRuleBooks
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
type: array
items:
$ref: "#/components/schemas/RuleBookResponse"
post:
tags:
- rule-book
operationId: createRuleBook
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateRuleBookRequest"
required: true
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
$ref: "#/components/schemas/RuleBookResponse"
/process-activities:
post:
tags:
- processing
operationId: processNewActivities
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
/ledgers/main:
post:
tags:
- ledger
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
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
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
operationId: findAllLedgers
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
operationId: findLedgerById
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
operationId: findAllCharacters
responses:
"404":
description: Not Found
"400":
description: Bad Request
"200":
description: OK
content:
'*/*':
schema:
type: array
items:
$ref: "#/components/schemas/CharacterResponse"
components:
schemas:
RuleClauseResponse:
type: object
properties:
rate:
type: string
enum:
- NONE
- VALUE
- JITA_BUY
- JITA_SELL
- EVE_ESTIMATE
fromLedgerRef:
type: string
toLedgerRef:
type: string
required:
- fromLedgerRef
- rate
- toLedgerRef
RuleResponse:
type: object
properties:
rules:
type: array
items:
$ref: "#/components/schemas/RuleClauseResponse"
required:
- rules
UpdateRuleBookRequest:
type: object
properties:
name:
type: string
ledgerRefs:
type: array
items:
type: string
rules:
type: object
additionalProperties:
$ref: "#/components/schemas/RuleResponse"
required:
- ledgerRefs
- name
- rules
RuleBookResponse:
type: object
properties:
ruleBookId:
type: string
format: uuid
name:
type: string
ledgerRefs:
type: array
items:
type: string
rules:
type: object
additionalProperties:
$ref: "#/components/schemas/RuleResponse"
required:
- ledgerRefs
- name
- ruleBookId
- rules
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
SetCharacterRuleBookRequest:
type: object
properties:
ruleBookId:
type: string
format: uuid
bindings:
type: object
additionalProperties:
type: string
format: uuid
required:
- bindings
- ruleBookId
CharacterRuleBookResponse:
type: object
properties:
characterId:
type: integer
format: int64
ruleBookId:
type: string
format: uuid
bindings:
type: object
additionalProperties:
type: string
format: uuid
required:
- bindings
- characterId
- ruleBookId
CreateRuleBookRequest:
type: object
properties:
name:
type: string
ledgerRefs:
type: array
items:
type: string
rules:
type: object
additionalProperties:
$ref: "#/components/schemas/RuleResponse"
required:
- ledgerRefs
- name
- rules
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