Bot releases are visible (Hide)
Published by unional about 1 year ago
5bba9a9: Update filenames to add the error
category.
Add examples for the errors.
Published by unional about 1 year ago
Published by unional about 1 year ago
c1efc1d: Flatten spec.
The updated folder-based spec does not work well when used.
It creates conflicting schema names between code/*
and status/*
.
Also, the naming scheme of error~any-of
and error=aborted
create invalid key per OpenAPI spec.
They are now replaced with -
.
Although it missed some meaning, that's a compromise need to be made.
Published by unional about 1 year ago
Published by unional about 1 year ago
oneOf
entries for code
and status
.Published by unional about 1 year ago
Published by unional about 1 year ago
Published by unional about 1 year ago
Published by unional about 1 year ago
google_cloud_api.any-of.yaml
for reuse.Published by unional about 1 year ago
Published by unional about 1 year ago
13e7538: Add missing status
in the data structure:
{
error: {
code: number,
status: string, // new
message: string,
details: Details[]
}
}
This status
is mentioned in the Google Cloud APIs documentation (example) but was not added before.
Since this change adds a new required/expected field. This is a breaking change.
Published by unional about 1 year ago
b394a73: google.rpc.Status
should be wrapped inside an error
field.
According to Google Cloud API Errors > HTTP Mapping:
// This message defines the error schema for Google's JSON HTTP APIs.
message Error {
// Deprecated. This message is only used by error format v1.
message ErrorProto {}
// This message has the same semantics as `google.rpc.Status`. It uses HTTP
// status code instead of gRPC status code. It has extra fields `status` and
// `errors` for backward compatibility with [Google API Client
// Libraries](https://developers.google.com/api-client-library).
message Status {
// The HTTP status code that corresponds to `google.rpc.Status.code`.
int32 code = 1;
// This corresponds to `google.rpc.Status.message`.
string message = 2;
// Deprecated. This field is only used by error format v1.
repeated ErrorProto errors = 3;
// This is the enum version for `google.rpc.Status.code`.
google.rpc.Code status = 4;
// This corresponds to `google.rpc.Status.details`.
repeated google.protobuf.Any details = 5;
}
// The actual error payload. The nested message structure is for backward
// compatibility with [Google API Client
// Libraries](https://developers.google.com/api-client-library). It also
// makes the error more readable to developers.
Status error = 1;
}
Published by unional about 1 year ago
42df780: Relax the type of HttpStatusText
to Record<number, string>
.
This allows user to use it by passing in an number
:
// `Response['status']: number`
const response: Response = await fetch(...)
const status = HttpStatusText[response.status]
Published by unional about 1 year ago
Published by unional about 1 year ago
out
field changes.Published by unional about 1 year ago
Published by unional about 1 year ago
Published by unional about 1 year ago
7cccde8: Refactor OpenApi specs.
paths, responses, schemas are now in separate files.
The overall spec example still needs to be updated.
e.g. updating each case to show which http status code is appropriate.
toCauses()
logic so that it does not need as any
.Published by unional over 1 year ago
9d56e0f: Adjust or add back main
export.
Allow older systems which does not support exports
field to use the module.
Updated dependencies [9d56e0f]