Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 2.52 KB

CONTRIBUTING.md

File metadata and controls

76 lines (49 loc) · 2.52 KB

Contributing

Requirements

Updating OpenAPI spec

All specifications are kept in .openapi folder:

https://github.com/redhat-developer/app-services-sdk-core/tree/main/.openapi

Autogeneration of SDKs

  1. All SDKs are autogenerated using OpenAPI Generator project.
  2. Bot accounts creates PR with the new versions of the SDK that needs be reviewed by the team, these bot accounts are triggered by changes to openapi spec changes in other repoistories. These events are then
  3. Once PR is merged developers are responsible for creating tagged release

Generating API clients locally

make generate

Updating error codes

Error codes are fetched dynamically from backend and generated inside every SDK. To generate error codes execute:

bash scripts/errors/fetch-errors.sh
node scripts/errors/generate_errors.js

Releases

Releasing a new version of the SDKs can be done by running a single workflow.

  • Go to the Github Actions tab and select the Java & Go SDK Release workflow

  • Select Run workflow, enter a version of the release in the format X.Y.Z

  • Select the branch the release will be created from and run the workflow

  • Once completed there will be a new release created with the name and tag vX.Y.X and a branch with the generated code needed named release-X.Y.Z. The tag created will be pointing to the new branch created.

Checking standards

Onboarding a new API

The OpenAPI Spec file should be validated before being added to the SDK genartion list. This can be done as follows:

npm i @rhoas/spectral-ruleset
make lint TARGET=.openapi/kafka-admin-rest.yaml

The generate script for each langauge should then be updated with the new API details.

Documentation portal

Documentation portal is available https://console.redhat.com/docs/api

NOTE: Documentation portal uses doc-portal branch as source for the API When releasing service to production we need to trigger documentation portal release

Releasing documentation portal changes

Create release with docs/ prefix. For example docs/v0.1.0. Review openapi updates.

Certificate of Origin

By contributing to this project you agree to the Developer Certificate of Origin (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the DCO file for details.