Skip to content

Commit 7e5994a

Browse files
Merge pull request #10 from DeepLcom/gitbook-usage-updates
Modify usage endpoint to show v2 responses only
2 parents ec5928d + e29c471 commit 7e5994a

4 files changed

Lines changed: 20 additions & 75 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ number is used only for corrections to the OpenAPI specification, for example:
1010
typos, schema fixes, or adding examples.
1111

1212

13+
## [Unreleased]
14+
### Deprecated
15+
* Remove all properties from `/usage` except for `character_count` and `character_limit`;
16+
these are the only two properties included in the API response for the v2 API.
17+
18+
1319
## [2.12.0] - 2024-02-29
1420
### Added
1521
* Add supported glossary language: Korean (KO).
@@ -117,6 +123,7 @@ typos, schema fixes, or adding examples.
117123
Initial release of the OpenAPI specification.
118124

119125

126+
[Unreleased]: https://github.com/DeepLcom/openapi/compare/v2.12.0...HEAD
120127
[2.12.0]: https://github.com/DeepLcom/openapi/compare/v2.11.0...v2.12.0
121128
[2.11.0]: https://github.com/DeepLcom/openapi/compare/v2.10.0...v2.11.0
122129
[2.10.0]: https://github.com/DeepLcom/openapi/compare/v2.9.2...v2.10.0

openapi.json

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,38 +1207,16 @@
12071207
"character_count": {
12081208
"description": "Characters translated so far in the current billing period.",
12091209
"type": "integer",
1210-
"format": "int64"
1210+
"format": "int64",
1211+
"example": 180118
12111212
},
12121213
"character_limit": {
1213-
"description": "Current maximum number of characters that can be translated per billing period.",
1214+
"description": "Current maximum number of characters that can be translated per billing period. If cost control is set, the cost control limit will be returned in this field.",
12141215
"type": "integer",
1215-
"format": "int64"
1216-
},
1217-
"document_limit": {
1218-
"description": "Documents translated so far in the current billing period.",
1219-
"type": "integer",
1220-
"format": "int64"
1221-
},
1222-
"document_count": {
1223-
"description": "Current maximum number of documents that can be translated per billing period.",
1224-
"type": "integer",
1225-
"format": "int64"
1226-
},
1227-
"team_document_limit": {
1228-
"description": "Documents translated by all users in the team so far in the current billing period.",
1229-
"type": "integer",
1230-
"format": "int64"
1231-
},
1232-
"team_document_count": {
1233-
"description": "Current maximum number of documents that can be translated by the team per billing period.",
1234-
"type": "integer",
1235-
"format": "int64"
1216+
"format": "int64",
1217+
"example": 1250000
12361218
}
12371219
}
1238-
},
1239-
"example": {
1240-
"character_count": 180118,
1241-
"character_limit": 1250000
12421220
}
12431221
}
12441222
}

openapi.yaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -954,34 +954,14 @@ paths:
954954
period.
955955
type: integer
956956
format: int64
957+
example: 180118
957958
character_limit:
958959
description: Current maximum number of characters that can be
959-
translated per billing period.
960+
translated per billing period. If cost control is set, the
961+
cost control limit will be returned in this field.
960962
type: integer
961963
format: int64
962-
document_limit:
963-
description: Documents translated so far in the current billing
964-
period.
965-
type: integer
966-
format: int64
967-
document_count:
968-
description: Current maximum number of documents that can be translated
969-
per billing period.
970-
type: integer
971-
format: int64
972-
team_document_limit:
973-
description: Documents translated by all users in the team so
974-
far in the current billing period.
975-
type: integer
976-
format: int64
977-
team_document_count:
978-
description: Current maximum number of documents that can be translated
979-
by the team per billing period.
980-
type: integer
981-
format: int64
982-
example:
983-
character_count: 180118
984-
character_limit: 1250000
964+
example: 1250000
985965
400:
986966
$ref: '#/components/responses/BadRequest'
987967
403:

openapi_gitbook.yaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -836,34 +836,14 @@ paths:
836836
period.
837837
type: integer
838838
format: int64
839+
example: 180118
839840
character_limit:
840841
description: Current maximum number of characters that can be
841-
translated per billing period.
842+
translated per billing period. If cost control is set, the
843+
cost control limit will be returned in this field.
842844
type: integer
843845
format: int64
844-
document_limit:
845-
description: Documents translated so far in the current billing
846-
period.
847-
type: integer
848-
format: int64
849-
document_count:
850-
description: Current maximum number of documents that can be translated
851-
per billing period.
852-
type: integer
853-
format: int64
854-
team_document_limit:
855-
description: Documents translated by all users in the team so
856-
far in the current billing period.
857-
type: integer
858-
format: int64
859-
team_document_count:
860-
description: Current maximum number of documents that can be translated
861-
by the team per billing period.
862-
type: integer
863-
format: int64
864-
example:
865-
character_count: 180118
866-
character_limit: 1250000
846+
example: 1250000
867847
400:
868848
$ref: '#/components/responses/BadRequest'
869849
403:

0 commit comments

Comments
 (0)