Files
threshold/internal/proto/controller/api/v1/error.proto
T
6b53766aa6 internal/proto: improvements to OpenAPIv2 spec (#4555)
* internal/gen: better API docs

Add various pieces of metadata that can be used by the API docs renderer.
Improve the service labels by specifying explicit tags.
Specify error responses. Specify version at generation time.

* internal/gen: add better errors

The default error entry is now used to cover all errors, as
adding a new error for every possible status code was a bit much.
This also properly includes the real error type now!

* Add various pieces of metadata that can be used by the API docs renderer. Improve the service labels by specifying explicit tags.

* make auth method API docs

* make API docs better

* make auth methods API docs nicer

* internal/gen: better attribute examples

Replace Output Only comments with a field behavior annotation in accounts.
Mark some fields as required.
Add elaborate description for attributes.

* Make API docs better

* Make API docs better

* Make API docs better

* internal/proto: regenerate files

* internal/proto: finish off account service

* Make API docs better

* internal/proto: add better API docs for aliases

* Tidy up service descriptions

* Added description for Boundary controller  API doc

* internal/gen: add better API intro

Copy parts of the API docs into the description

* sdk: add openapi dependency

* internal/gen: move global API doc to separate file

* internal/gen: remove required annotations

Unfortunately, while these help with the creating of resources, they still
appear required in contexts where they are not, such as when
updating a resource.

* Review comments

---------

Co-authored-by: jigar-hashicorp <jigar.shah@hashicorp.com>
Co-authored-by: Isaac Christian (he/him) <112639904+isaacchristian@users.noreply.github.com>
2024-04-08 13:55:17 -07:00

51 lines
1.4 KiB
Protocol Buffer

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
syntax = "proto3";
package controller.api.v1;
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api;api";
// Error information relevant to an error that was wrapped by the backend.
message WrappedError {
// A string indicating what operation was being run when the wrapped error occurred.
string op = 1;
// The wrapped error message.
string message = 2;
}
// Additional details regarding a specific error.
message ErrorDetails {
// Request-field-specific error details.
repeated FieldError request_fields = 1 [json_name = "request_fields"];
// The errors that were wrapped in the backend for this returned error.
repeated WrappedError wrapped_errors = 2 [json_name = "wrapped_errors"];
}
// FieldErrors contains error information on a per field basis.
message FieldError {
// The name of the field.
string name = 1;
// The description of the error.
string description = 2;
}
// Error is returned by the JSON API when an error occurs.
message Error {
// The kind of error this is.
string kind = 1;
// An string indicating what operation was being run when the error was returned.
string op = 2;
// A human-readable explanation specific to this occurrence of the error.
string message = 3;
// Additional metadata regarding the error. Depending on the error, different fields are populated.
ErrorDetails details = 4;
}