diff --git a/.github/workflows/optic_pr.yml b/.github/workflows/optic_pr.yml index 78fd35f..a1a7964 100644 --- a/.github/workflows/optic_pr.yml +++ b/.github/workflows/optic_pr.yml @@ -13,7 +13,11 @@ jobs: uses: actions/checkout@v3 - name: Install Optic - run: npm install --location global @useoptic/optic@0.49.7-7 + run: npm install --location global @useoptic/optic - name: Run Optic - run: OPTIC_ENV=staging OPTIC_TOKEN="oidMDU4MmI1YzQtNTQwMS00YjIxLWI2Y2ItMDFmNGU0ODlkYWI3.ZBWfGe1k1noEvGGcKTtJG.-_KL_7gZsqLqfetE7iLm4" GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} optic run + env: + OPTIC_TOKEN: ${{ secrets.OPTIC_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPTIC_ENV: staging + run: optic run diff --git a/nope.yaml b/nope.yaml new file mode 100644 index 0000000..e69de29 diff --git a/optic.yml b/optic.yml new file mode 100644 index 0000000..7c651ba --- /dev/null +++ b/optic.yml @@ -0,0 +1,9 @@ +ruleset: + - naming: + required_on: always + requestHeaders: Capital-Param-Case + responseHeaders: param-case + properties: Capital-Param-Case + pathComponents: param-case + queryParameters: snake_case + - breaking-changes diff --git a/todo-api.yaml b/todo-api.yaml index bf8a8a8..166fde8 100644 --- a/todo-api.yaml +++ b/todo-api.yaml @@ -1,21 +1,27 @@ openapi: 3.0.1 info: title: TodoAPI - version: "1.1" + version: '1.1' paths: /todos: get: parameters: - - name: limit - in: query + - name: new + in: header schema: type: number required: false + - name: tDah + in: query + schema: + type: string + required: true - name: test in: header schema: type: string required: false + responses: '200': description: okay @@ -27,7 +33,7 @@ paths: todos: type: array items: - $ref: "#/components/schemas/TodoRead" + $ref: '#/components/schemas/TodoRead' required: - todos components: @@ -44,8 +50,6 @@ components: example: type: string format: date-time - example: "2020-01-01T00:00:00.000Z" + example: '2020-01-01T00:00:00.000Z' required: - - name - status - - created_at