Sybren A. Stüvel 1db1b06c9e Website: correct the OpenAPI commit guidelines
The OpenAPI-generated code no longer contains the git hash, so the docs
had to change for that.
2022-08-01 16:36:10 +02:00

947 B

title weight
OpenAPI Commit Guidelines 30

Typically a change to the OpenAPI definition consists of three steps, namely making the change to the OpenAPI file, regenerating code, and then alter whatever manually-written code needs altering.

Each of these steps should be committed independently, by following these steps:

  1. Commit the changes to pkg/api/flamenco-openapi.yaml, prefixing the commit message with OAPI:.
  2. Regenerate code with make generate, then commit with message OAPI: Regenerate code.
  3. Commit any other code changes to complete the change.

The downside to this approach is that the second commit will likely break the project, which is unfortunate. However, this approach does have some advantages:

  • The regenerated code has the right Flamenco version number.
  • Changes to manually-written and generated code are tracked in separate commits. This makes them easier to comprehend by humans.