diff --git a/.github/workflows/spec-validate.yaml b/.github/workflows/spec-validate.yaml new file mode 100644 index 0000000..9bb47e9 --- /dev/null +++ b/.github/workflows/spec-validate.yaml @@ -0,0 +1,20 @@ +name: OpenAPI spec validation action + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Run OpenAPI spec validation + run: | + docker run --rm -v $PWD:/spec redocly/cli lint ./service/openapi.yaml + echo "{exit_code}={$?}" >> $GITHUB_STATE \ No newline at end of file diff --git a/service/openapi.yaml b/service/openapi.yaml index 8783fce..55f34ef 100644 --- a/service/openapi.yaml +++ b/service/openapi.yaml @@ -1,4 +1,6 @@ openapi: 3.1.0 +servers: + - url: / info: version: 0.1.0 title: OpenFeature Remote Evaluation Protocol (OFREP) @@ -49,6 +51,7 @@ paths: $ref: '#/components/schemas/generalErrorResponse' /ofrep/v1/evaluate/flags/{key}: post: + summary: OFREP single flag evaluation contract description: OFREP single flag evaluation request parameters: - name: key @@ -102,6 +105,7 @@ paths: $ref: '#/components/schemas/generalErrorResponse' /ofrep/v1/evaluate/flags: post: + summary: OFREP bulk flag evaluation contract description: OFREP bulk evaluation request parameters: - in: header