This repository contains gRPC protocol definitions and OpenAPI Specification for ReportPortal APIs and provides knowledge about its own services. You can use Protocol Buffers (Protobuf) descriptions or OpenAPI specifications to generate your client's libraries or take pre-generated.
ReportPortal APIs are deployed as the API Service (ext. link).
Main ReportPortal APIs use OpenAPI Specification (OAS) to describe their services.
Some ReportPortal APIs use Protobuf version 3 (proto3) as their Interface Definition Language (IDL) to define the API interface and the structure of the payload messages.
Currently, we're migrating from a Code-first to an API-first approach. That means that you can't find all specifications here. You can find other specifications in ReportPortal UI Settings. Little by little, we will provide the specifications here.
tree
.
├── api
│ ├── openapi
│ │ ├── models
│ │ │ └── model.yaml
│ │ └── api-references.yaml
│ └── proto
│ ├── buf.md
│ ├── buf.yaml
│ └── reportportal
│ ├── common
│ │ ├── v1
│ │ │ └── types.proto
│ │ └── v2
│ └── reporting (domain)
│ ├── v1
│ │ └── reporting.proto
│ └── v2
├── build
├── docs
├── src
└── templates
N
- catalog for grouping definitions by versionsWe use buf
CLI to create consistent Protobuf APIs that preserve compatibility
and comply with best practices.
To work with this repository, install buf.
The buf build
command is used to verify that an input compiles.
bash
buf build --exclude-source-info -o -#format=json | jq '.file[] | .package'
Just use
bash
buf lint
bash
buf breaking --against '.git#branch=main'
For generating Java code we use Protobuf Plugin for Gradle.
Perform for generate code:
shell
./gradlew generateProto
For other programming languages we use buf.
Buf doesn't have a built-in compiler. We use remote plugins for generating code for the following languages:
Perform for generate code:
shell
buf generate
Optional languages:
Perform for generate code:
shell
buf generate --template templates/buf.gen.opt.yaml
Before, you need to install protocol buffer compiler with standard plugins.
Config buf.gen.local.yaml for your needs or use default protoc
command.
Perform for generate code:
shell
buf generate --template templates/buf.gen.local.yaml
We use additional types provided by Google Type Library.
You can use them in your proto files like:
proto
import "google/type/<type_name>.proto";
buf lint
for check style guid requirements and buf breaking --against '.git#branch=main'
for checking forwards and backward compatibility