Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.193.4
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Feb 24, 2024
1 parent a1e62e4 commit 6a82c0e
Show file tree
Hide file tree
Showing 20 changed files with 2,074 additions and 824 deletions.
12 changes: 7 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ management:
docChecksum: 354db46ad7c46031799521bd155482f1
docVersion: 1.0.0
speakeasyVersion: internal
generationVersion: 2.269.0
releaseVersion: 0.3.0
configChecksum: a6ab39701eece3ec42220aa0e85c6036
generationVersion: 2.272.4
releaseVersion: 0.4.0
configChecksum: afea9277ce28b487c421d53ae95fe964
repoURL: https://github.com/unkeyed/speakeasy.git
repoSubDirectory: .
installationURL: https://github.com/unkeyed/speakeasy
features:
typescript:
constsAndDefaults: 0.1.3
core: 3.5.1
core: 3.6.1
flattening: 2.81.1
globalSecurity: 2.82.2
globalSecurity: 2.82.3
globalServerURLs: 2.82.3
responseFormat: 0.1.0
generatedFiles:
Expand All @@ -31,11 +31,13 @@ generatedFiles:
- src/lib/event-streams.ts
- src/lib/http.ts
- src/lib/retries.ts
- src/lib/schemas.ts
- src/lib/sdks.ts
- src/lib/security.ts
- src/lib/url.ts
- src/sdk/index.ts
- src/models/errors/sdkerror.ts
- src/models/errors/sdkvalidationerror.ts
- src/types/blobs.ts
- src/types/decimal.ts
- src/types/index.ts
Expand Down
4 changes: 3 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ generation:
nameResolutionDec2023: true
parameterOrderingFeb2024: false
requestResponseComponentNamesFeb2024: false
auth:
oAuth2ClientCredentialsEnabled: false
typescript:
version: 0.3.0
version: 0.4.0
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ All SDK methods return a response object or throw an error. If Error objects are
| errors.ErrInternalServerError | 500 | application/json |
| errors.SDKError | 4xx-5xx | */* |

Example
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.


```typescript
import { SDK } from "openapi";
import * as errors from "openapi/models/errors";

async function run() {
const sdk = new SDK({
Expand All @@ -116,6 +118,13 @@ async function run() {
result = await sdk.getV1Liveness();
} catch (err) {
switch (true) {
case err instanceof errors.SDKValidationError: {
// Validation errors can be pretty-printed
console.error(err.pretty());
// Raw value may also be inspected
console.error(err.rawValue);
return;
}
case err instanceof errors.ErrBadRequest: {
console.error(err); // handle exception
return;
Expand Down
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,12 @@ Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.192.1 (2.269.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.3.0] .
- [typescript v0.3.0] .

## 2024-02-24 00:27:29
### Changes
Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.193.4 (2.272.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.4.0] .
6 changes: 3 additions & 3 deletions docs/models/components/key.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
| `apiId` | *string* | :heavy_minus_sign: | The id of the api that this key is for | api_1234 |
| `name` | *string* | :heavy_minus_sign: | The name of the key, give keys a name to easily identify their purpose | Customer X |
| `ownerId` | *string* | :heavy_minus_sign: | The id of the tenant associated with this key. Use whatever reference you have in your system to identify the tenant. When verifying the key, we will send this field back to you, so you know who is accessing your API. | user_123 |
| `meta` | Record<string, *any*> | :heavy_minus_sign: | Any additional metadata you want to store with the key | {"roles":["admin","user"],"stripeCustomerId":"cus_1234"} |
| `meta` | Record<string, *any*> | :heavy_minus_sign: | Any additional metadata you want to store with the key | {<br/>"roles": [<br/>"admin",<br/>"user"<br/>],<br/>"stripeCustomerId": "cus_1234"<br/>} |
| `createdAt` | *number* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key was created | 0 |
| `deletedAt` | *number* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key was deleted. We don't delete the key outright, you can restore it later. | 0 |
| `expires` | *number* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring. | 0 |
| `remaining` | *number* | :heavy_minus_sign: | The number of requests that can be made with this key before it becomes invalid. If this field is null or undefined, the key has no request limit. | 1000 |
| `refill` | [components.Refill](../../models/components/refill.md) | :heavy_minus_sign: | Unkey allows you to refill remaining verifications on a key on a regular interval. | {"interval":"daily","amount":10} |
| `ratelimit` | [components.Ratelimit](../../models/components/ratelimit.md) | :heavy_minus_sign: | Unkey comes with per-key ratelimiting out of the box. | {"type":"fast","limit":10,"refillRate":1,"refillInterval":60} |
| `refill` | [components.Refill](../../models/components/refill.md) | :heavy_minus_sign: | Unkey allows you to refill remaining verifications on a key on a regular interval. | {<br/>"interval": "daily",<br/>"amount": 10<br/>} |
| `ratelimit` | [components.Ratelimit](../../models/components/ratelimit.md) | :heavy_minus_sign: | Unkey comes with per-key ratelimiting out of the box. | {<br/>"type": "fast",<br/>"limit": 10,<br/>"refillRate": 1,<br/>"refillInterval": 60<br/>} |
| `enabled` | *boolean* | :heavy_minus_sign: | Sets if key is enabled or disabled. Disabled keys are not valid. | true |
Loading

0 comments on commit 6a82c0e

Please sign in to comment.