Init OpenAPI

This commit is contained in:
rak
2025-06-21 16:55:53 +02:00
parent 18719f1ad9
commit 2545c0840d
43 changed files with 4770 additions and 13 deletions

View File

@@ -0,0 +1,46 @@
# Card
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**description** | **string** | | [default to undefined]
**pendulumDescription** | **string** | | [optional] [default to undefined]
**defense** | **number** | | [optional] [default to undefined]
**attack** | **number** | | [optional] [default to undefined]
**health** | **number** | | [optional] [default to undefined]
**level** | **number** | | [optional] [default to undefined]
**linkValue** | **number** | | [optional] [default to undefined]
**name** | **string** | | [default to undefined]
**type** | **string** | | [default to undefined]
**frameType** | **string** | | [default to undefined]
**archetype** | **string** | | [optional] [default to undefined]
**race** | **string** | | [optional] [default to undefined]
**attribute** | **string** | | [optional] [default to undefined]
## Example
```typescript
import { Card } from 'restClient';
const instance: Card = {
id,
description,
pendulumDescription,
defense,
attack,
health,
level,
linkValue,
name,
type,
frameType,
archetype,
race,
attribute,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,26 @@
# CardPrint
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**regionalSet** | [**RegionalSet**](RegionalSet.md) | | [default to undefined]
**card** | [**NewCard**](NewCard.md) | | [default to undefined]
**imageApiPath** | **string** | | [default to undefined]
## Example
```typescript
import { CardPrint } from 'restClient';
const instance: CardPrint = {
id,
regionalSet,
card,
imageApiPath,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,219 @@
# CardService
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**apiCardsIdNewPut**](#apicardsidnewput) | **PUT** /api/cards/{id}/new | Test|
|[**getCardById**](#getcardbyid) | **GET** /api/cards/{id} | Get a singular Card by its ID|
|[**getCardImageById**](#getcardimagebyid) | **GET** /api/cards/{id}/image | Get the image of a Card by its ID|
|[**getCards**](#getcards) | **GET** /api/cards | Get a page of Cards with optional name query parameter|
# **apiCardsIdNewPut**
> apiCardsIdNewPut()
### Example
```typescript
import {
CardService,
Configuration
} from 'restClient';
const configuration = new Configuration();
const apiInstance = new CardService(configuration);
let id: number; // (default to undefined)
const { status, data } = await apiInstance.apiCardsIdNewPut(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**number**] | | defaults to undefined|
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | No Content | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCardById**
> NewCard getCardById()
### Example
```typescript
import {
CardService,
Configuration
} from 'restClient';
const configuration = new Configuration();
const apiInstance = new CardService(configuration);
let id: number; // (default to undefined)
const { status, data } = await apiInstance.getCardById(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**number**] | | defaults to undefined|
### Return type
**NewCard**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Card retrieved | - |
|**404** | Card with ID cannot be found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCardImageById**
> File getCardImageById()
### Example
```typescript
import {
CardService,
Configuration
} from 'restClient';
const configuration = new Configuration();
const apiInstance = new CardService(configuration);
let id: number; // (default to undefined)
const { status, data } = await apiInstance.getCardImageById(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**number**] | | defaults to undefined|
### Return type
**File**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/octet-stream
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Card image retrieved | - |
|**404** | Card image for ID cannot be found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCards**
> Array<Card> getCards()
### Example
```typescript
import {
CardService,
Configuration
} from 'restClient';
const configuration = new Configuration();
const apiInstance = new CardService(configuration);
let name: string; // (optional) (default to undefined)
let page: number; // (optional) (default to undefined)
let pageSize: number; // (optional) (default to undefined)
const { status, data } = await apiInstance.getCards(
name,
page,
pageSize
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **name** | [**string**] | | (optional) defaults to undefined|
| **page** | [**number**] | | (optional) defaults to undefined|
| **pageSize** | [**number**] | | (optional) defaults to undefined|
### Return type
**Array<Card>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Page for the given query | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,14 @@
# CardType
## Enum
* `Monster` (value: `'MONSTER'`)
* `Spell` (value: `'SPELL'`)
* `Trap` (value: `'TRAP'`)
* `Unknown` (value: `'UNKNOWN'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,24 @@
# Deck
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**name** | **string** | | [default to undefined]
**cards** | **{ [key: string]: number; }** | | [default to undefined]
## Example
```typescript
import { Deck } from 'restClient';
const instance: Deck = {
id,
name,
cards,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,224 @@
# DeckService
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addCardToDeck**](#addcardtodeck) | **POST** /api/decks/{deckName}/{cardId} | Add a Card by its ID to a Deck by its name|
|[**createDeck**](#createdeck) | **POST** /api/decks | Create a Deck with a given name|
|[**getDeckByName**](#getdeckbyname) | **GET** /api/decks/{name} | Get a singular Deck by its name|
|[**getDecks**](#getdecks) | **GET** /api/decks | Get a page of Decks with optional name query parameter|
# **addCardToDeck**
> addCardToDeck()
### Example
```typescript
import {
DeckService,
Configuration
} from 'restClient';
const configuration = new Configuration();
const apiInstance = new DeckService(configuration);
let cardId: number; // (default to undefined)
let deckName: string; // (default to undefined)
const { status, data } = await apiInstance.addCardToDeck(
cardId,
deckName
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **cardId** | [**number**] | | defaults to undefined|
| **deckName** | [**string**] | | defaults to undefined|
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Card successfully added to Deck | - |
|**404** | Deck with name cannot be found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **createDeck**
> createDeck(deck)
### Example
```typescript
import {
DeckService,
Configuration,
Deck
} from 'restClient';
const configuration = new Configuration();
const apiInstance = new DeckService(configuration);
let deck: Deck; //
const { status, data } = await apiInstance.createDeck(
deck
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **deck** | **Deck**| | |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**401** | Deck successfully created | - |
|**409** | Card with name already exists | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getDeckByName**
> Deck getDeckByName()
### Example
```typescript
import {
DeckService,
Configuration
} from 'restClient';
const configuration = new Configuration();
const apiInstance = new DeckService(configuration);
let name: string; // (default to undefined)
const { status, data } = await apiInstance.getDeckByName(
name
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **name** | [**string**] | | defaults to undefined|
### Return type
**Deck**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Deck retrieved | - |
|**404** | Deck with name cannot be found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getDecks**
> PageDeck getDecks()
### Example
```typescript
import {
DeckService,
Configuration
} from 'restClient';
const configuration = new Configuration();
const apiInstance = new DeckService(configuration);
let name: string; // (optional) (default to undefined)
let page: number; // (optional) (default to undefined)
let pageSize: number; // (optional) (default to undefined)
const { status, data } = await apiInstance.getDecks(
name,
page,
pageSize
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **name** | [**string**] | | (optional) defaults to undefined|
| **page** | [**number**] | | (optional) defaults to undefined|
| **pageSize** | [**number**] | | (optional) defaults to undefined|
### Return type
**PageDeck**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Page of Decks for given query | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,28 @@
# NewCard
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [optional] [default to undefined]
**cardType** | [**CardType**](CardType.md) | | [default to undefined]
**description** | **string** | | [default to undefined]
**name** | **string** | | [default to undefined]
**cardPrints** | [**Set&lt;CardPrint&gt;**](CardPrint.md) | | [default to undefined]
## Example
```typescript
import { NewCard } from 'restClient';
const instance: NewCard = {
id,
cardType,
description,
name,
cardPrints,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,26 @@
# PageDeck
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | [**Array&lt;Deck&gt;**](Deck.md) | | [default to undefined]
**page** | **number** | | [optional] [default to undefined]
**pageSize** | **number** | | [optional] [default to undefined]
**totalPages** | **number** | | [optional] [default to undefined]
## Example
```typescript
import { PageDeck } from 'restClient';
const instance: PageDeck = {
content,
page,
pageSize,
totalPages,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,24 @@
# Region
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [default to undefined]
**name** | **string** | | [default to undefined]
**regionalSets** | [**Set&lt;RegionalSet&gt;**](RegionalSet.md) | | [default to undefined]
## Example
```typescript
import { Region } from 'restClient';
const instance: Region = {
id,
name,
regionalSets,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,26 @@
# RegionalSet
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [default to undefined]
**prefix** | [**SetPrefix**](SetPrefix.md) | | [default to undefined]
**region** | [**Region**](Region.md) | | [default to undefined]
**cardPrints** | [**Set&lt;CardPrint&gt;**](CardPrint.md) | | [default to undefined]
## Example
```typescript
import { RegionalSet } from 'restClient';
const instance: RegionalSet = {
id,
prefix,
region,
cardPrints,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,24 @@
# SetPrefix
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **number** | | [default to undefined]
**name** | **string** | | [default to undefined]
**regionalSets** | [**Set&lt;RegionalSet&gt;**](RegionalSet.md) | | [default to undefined]
## Example
```typescript
import { SetPrefix } from 'restClient';
const instance: SetPrefix = {
id,
name,
regionalSets,
};
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)