Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #3

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/optic_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Empty file added nope.yaml
Empty file.
9 changes: 9 additions & 0 deletions optic.yml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 11 additions & 7 deletions todo-api.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -27,7 +33,7 @@ paths:
todos:
type: array
items:
$ref: "#/components/schemas/TodoRead"
$ref: '#/components/schemas/TodoRead'
required:
- todos
components:
Expand All @@ -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
Loading