Files
charybdis/proto/core/api.proto
T
2026-05-12 17:06:43 +02:00

51 lines
1.5 KiB
Protocol Buffer

syntax = "proto3";
package charybdis.core;
import "core/common.proto";
// APIMetadata represents identifying information for an API entity
// An API is a contract for data exchange between software components
message APIMetadata {
// Required: The name of the API
string name = 1;
// Optional: Namespace for organizational grouping (default: "default")
string namespace = 2;
// Optional: Human-readable description of the API
string description = 3;
// Optional: Labels for categorization and filtering
// Key-value pairs (e.g., "protocol": "rest", "version": "v1")
map<string, string> labels = 4;
// Optional: Tags for additional classification
repeated string tags = 5;
// Optional: Links to external resources
repeated Link links = 6;
}
// APISpec represents configuration for an API entity
message APISpec {
// Required: Type of API definition
// Standard types: "openapi", "grpc", "graphql", "asyncapi", "rest"
string type = 1;
// Required: Lifecycle stage (e.g., "production", "experimental", "deprecated")
string lifecycle = 2;
// Required: Owner team or individual (references a Group or User entity)
string owner = 3;
// Optional: System this API belongs to (references a System entity)
string system = 4;
// Required: The API definition itself
// For OpenAPI: the full OpenAPI spec in YAML or JSON
// For gRPC: the .proto file content or reference
// For GraphQL: the schema definition
string definition = 5;
}