Skip to content

Commit

Permalink
feat: spec updated (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
promiseofcake authored Aug 3, 2024
1 parent bb1b94d commit 7ec54e3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 305 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ install-tools:
fetch-spec:
curl --silent "https://api.artifactsmmo.com/openapi.json" | jq . > spec/openapi.json

all: install-tools fetch-spec process-spec generate-client test

process-spec:
openapi-down-convert --input spec/openapi.json --output spec/openapi-3.0.json
sed -i '' 's/"type": "null"/"nullable": true/g' spec/openapi-3.0.json
Expand Down
159 changes: 3 additions & 156 deletions client/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 11 additions & 75 deletions spec/openapi-3.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -1147,80 +1147,6 @@
}
}
},
"/my/{name}/logs": {
"get": {
"tags": [
"My characters"
],
"summary": "Get Character Logs",
"description": "History of your character's last 100 actions.",
"operationId": "get_character_logs_my__name__logs_get",
"security": [
{
"JWTBearer": []
}
],
"parameters": [
{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-zA-Z0-9_-]+$",
"title": "Character name",
"description": "Name of your character."
},
"description": "Name of your character."
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"responses": {
"200": {
"description": "Successfully fetched logs.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataPage_LogSchema_"
}
}
}
},
"404": {
"description": "Logs not found."
},
"498": {
"description": "Character not found."
}
}
}
},
"/my/logs": {
"get": {
"tags": [
Expand Down Expand Up @@ -1276,6 +1202,9 @@
},
"404": {
"description": "Logs not found."
},
"498": {
"description": "Character not found."
}
}
}
Expand Down Expand Up @@ -3440,6 +3369,12 @@
"title": "Remainingseconds",
"description": "Deprecated** The remaining seconds of the cooldown."
},
"started_at": {
"type": "string",
"format": "date-time",
"title": "Started At",
"description": "The start of the cooldown."
},
"expiration": {
"type": "string",
"format": "date-time",
Expand Down Expand Up @@ -3473,6 +3408,7 @@
"remaining_seconds",
"totalSeconds",
"remainingSeconds",
"started_at",
"expiration",
"reason"
],
Expand Down Expand Up @@ -5745,4 +5681,4 @@
}
}
}
}
}
Loading

0 comments on commit 7ec54e3

Please sign in to comment.