diff --git a/.github/workflows/validate-openapi-spec.yml b/.github/workflows/validate-openapi-spec.yml new file mode 100644 index 00000000000..eed56e305d1 --- /dev/null +++ b/.github/workflows/validate-openapi-spec.yml @@ -0,0 +1,26 @@ +name: validate-openapi-spec +on: + pull_request: + paths: + - .github/workflows/validate-openapi-spec.yml + - openapi/* + workflow_dispatch: + inputs: +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Install our tools + shell: bash + run: | + npm install -g @apidevtools/swagger-cli + - name: Run validation + shell: bash + run: | + for spec in openapi/*.json; do + swagger-cli validate $spec || exit + done diff --git a/Cargo.lock b/Cargo.lock index 81a972fa4a1..42f0f17b7a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -869,7 +869,7 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dropshot" version = "0.6.1-dev" -source = "git+https://github.com/oxidecomputer/dropshot?branch=main#5a80ca53df78b5ee11dc97a252864c6c86046a0b" +source = "git+https://github.com/oxidecomputer/dropshot?branch=main#72583242d80b88561602a37013595e9f75f4f394" dependencies = [ "async-trait", "base64", @@ -897,14 +897,14 @@ dependencies = [ "syn", "tokio", "toml", - "usdt 0.2.1", + "usdt 0.3.1", "uuid", ] [[package]] name = "dropshot_endpoint" version = "0.6.1-dev" -source = "git+https://github.com/oxidecomputer/dropshot?branch=main#5a80ca53df78b5ee11dc97a252864c6c86046a0b" +source = "git+https://github.com/oxidecomputer/dropshot?branch=main#72583242d80b88561602a37013595e9f75f4f394" dependencies = [ "proc-macro2", "quote", diff --git a/openapi/nexus.json b/openapi/nexus.json index edc87680a77..fb5035653c8 100644 --- a/openapi/nexus.json +++ b/openapi/nexus.json @@ -187,13 +187,21 @@ }, "required": true }, - "responses": {} + "responses": { + "default": { + "description": "" + } + } } }, "/logout": { "post": { "operationId": "logout", - "responses": {} + "responses": { + "default": { + "description": "" + } + } } }, "/organizations": {