sample (1.0.0)

Download OpenAPI specification:Download

License: Apache-2.0

Veleta で自動生成した API Server の Golang 版のサンプル

顧客の登録

顧客を新規登録する

Authorizations:
basicAuth
Request Body schema: application/json
customerId
required
integer <int64> (顧客ID)

顧客の識別子

name
required
string (氏名) [ 1 .. 16 ] characters

顧客の氏名

address
required
string (住所) [ 1 .. 128 ] characters

顧客の住所

Responses

Request samples

Content type
application/json
{
  • "customerId": 0,
  • "name": "string",
  • "address": "string"
}

Response samples

Content type
application/json
{
  • "customerId": 0,
  • "name": "string",
  • "address": "string"
}

顧客の抽出

顧客を検索する

Authorizations:
basicAuth
query Parameters
name
Array of strings

顧客の氏名

address
Array of strings

顧客の住所

limit
integer [ 1 .. 100 ]
Default: 100

最大件数

customerId
integer <int64>

検索済みの顧客の識別子

Responses

Response samples

Content type
application/json
[
  • {
    }
]

顧客の取得

識別子で指定した顧客を取得する

Authorizations:
basicAuth
path Parameters
customerId
integer <int64>

顧客の識別子

Responses

Response samples

Content type
application/json
{
  • "customerId": 0,
  • "name": "string",
  • "address": "string"
}

顧客の更新

識別子で指定した顧客を更新する

Authorizations:
basicAuth
path Parameters
customerId
integer <int64>

顧客の識別子

Request Body schema: application/json
customerId
integer <int64> (顧客ID)

顧客の識別子

name
string (氏名) [ 1 .. 16 ] characters

顧客の氏名

address
string (住所) [ 1 .. 128 ] characters

顧客の住所

Responses

Request samples

Content type
application/json
{
  • "customerId": 0,
  • "name": "string",
  • "address": "string"
}

Response samples

Content type
application/json
{
  • "customerId": 0,
  • "name": "string",
  • "address": "string"
}

顧客の削除

識別子で指定した顧客を削除する

Authorizations:
basicAuth
path Parameters
customerId
integer <int64>

顧客の識別子

Responses

製品の登録

製品を新規登録する

Authorizations:
basicAuth
Request Body schema: application/json
productId
required
integer <int64> (製品ID)

製品の識別子

name
required
string (製品名) [ 1 .. 64 ] characters

製品の名称

pricePerUnit
required
integer <int64> (標準単価) >= 0

製品の標準単価

Responses

Request samples

Content type
application/json
{
  • "productId": 0,
  • "name": "string",
  • "pricePerUnit": 0
}

Response samples

Content type
application/json
{
  • "productId": 0,
  • "name": "string",
  • "pricePerUnit": 0
}

製品の抽出

製品を検索する

Authorizations:
basicAuth
query Parameters
name
Array of strings

製品の名称

pricePerUnit
Array of integers <int64> [ items <int64 > ]

製品の標準単価

limit
integer [ 1 .. 100 ]
Default: 100

最大件数

productId
integer <int64>

検索済みの製品の識別子

Responses

Response samples

Content type
application/json
[
  • {
    }
]

製品の取得

識別子で指定した製品を取得する

Authorizations:
basicAuth
path Parameters
productId
integer <int64>

製品の識別子

Responses

Response samples

Content type
application/json
{
  • "productId": 0,
  • "name": "string",
  • "pricePerUnit": 0
}

製品の更新

識別子で指定した製品を更新する

Authorizations:
basicAuth
path Parameters
productId
integer <int64>

製品の識別子

Request Body schema: application/json
productId
integer <int64> (製品ID)

製品の識別子

name
string (製品名) [ 1 .. 64 ] characters

製品の名称

pricePerUnit
integer <int64> (標準単価) >= 0

製品の標準単価

Responses

Request samples

Content type
application/json
{
  • "productId": 0,
  • "name": "string",
  • "pricePerUnit": 0
}

Response samples

Content type
application/json
{
  • "productId": 0,
  • "name": "string",
  • "pricePerUnit": 0
}

製品の削除

識別子で指定した製品を削除する

Authorizations:
basicAuth
path Parameters
productId
integer <int64>

製品の識別子

Responses

注文の登録

注文を新規登録する

Authorizations:
basicAuth
Request Body schema: application/json
orderId
required
integer <int64> (受注ID)

注文の識別子

customerId
required
integer <int64> (顧客ID)

注文した顧客の識別子

orderDate
required
string <date> (受注日)

注文を受注した日

Array of objects (注文明細)

注文の明細

Responses

Request samples

Content type
application/json
{
  • "orderId": 0,
  • "customerId": 0,
  • "orderDate": "2019-08-24",
  • "details": [
    ]
}

Response samples

Content type
application/json
{
  • "orderId": 0,
  • "customerId": 0,
  • "orderDate": "2019-08-24",
  • "details": [
    ]
}

注文の抽出

注文を検索する

Authorizations:
basicAuth
query Parameters
customerId
Array of strings

顧客の識別子

orderDate
Array of strings

受注日

limit
integer [ 1 .. 100 ]
Default: 100

最大件数

orderId
integer <int64>

検索済みの注文の識別子

Responses

Response samples

Content type
application/json
[
  • {
    }
]

注文の取得

識別子で指定した注文を取得する

Authorizations:
basicAuth
path Parameters
orderId
integer <int64>

注文の識別子

Responses

Response samples

Content type
application/json
{
  • "orderId": 0,
  • "customerId": 0,
  • "orderDate": "2019-08-24",
  • "details": [
    ]
}

注文の更新

識別子で指定した注文を更新する

Authorizations:
basicAuth
path Parameters
orderId
integer <int64>

注文の識別子

Request Body schema: application/json
orderId
integer <int64> (受注ID)

注文の識別子

customerId
integer <int64> (顧客ID)

注文した顧客の識別子

orderDate
string <date> (受注日)

注文を受注した日

Array of objects (注文明細)

注文の明細

Responses

Request samples

Content type
application/json
{
  • "orderId": 0,
  • "customerId": 0,
  • "orderDate": "2019-08-24",
  • "details": [
    ]
}

Response samples

Content type
application/json
{
  • "orderId": 0,
  • "customerId": 0,
  • "orderDate": "2019-08-24",
  • "details": [
    ]
}

注文の削除

識別子で指定した注文を削除する

Authorizations:
basicAuth
path Parameters
orderId
integer <int64>

注文の識別子

Responses