Skip to content

Commit

Permalink
Use standard rules.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Jun 4, 2024
1 parent cbb7186 commit c168d09
Show file tree
Hide file tree
Showing 23 changed files with 169 additions and 173 deletions.
8 changes: 4 additions & 4 deletions .github/opensearch-cluster/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ services:
opensearch-cluster:
image: opensearchproject/opensearch:${OPENSEARCH_VERSION:-latest}
ports:
- "9200:9200"
- "9600:9600"
- '9200:9200'
- '9600:9600'
environment:
- "discovery.type=single-node"
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD}"
- discovery.type=single-node
- 'OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD}'
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Release Specification to GitHub
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: ${{ steps.branch.outputs.name }}
prerelease: true
title: OpenSearch OpenAPI Spec (${{ steps.branch.outputs.name }})
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:

- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: "autocut, skip-changelog"
skipLabels: 'autocut, skip-changelog'
2 changes: 1 addition & 1 deletion .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main

concurrency:
group: "pages"
group: pages
cancel-in-progress: false

permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
COMMENT_IDENTIFIER=$(jq -r '.comment_identifier' ./pr-comment.json)
TEMPLATE_NAME=$(jq -r '.template_name' ./pr-comment.json)
TEMPLATE_DATA=$(jq -c '.template_data' ./pr-comment.json)
vars=(
PR_NUMBER
COMMENT_IDENTIFIER
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/test-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: Test Spec

on:
push:
branches: [ '**' ]
paths:
- 'package*.json'
- 'tsconfig.json'
- 'tools/tester/**'
- 'spec/**'
branches: ['**']
paths:
- 'package*.json'
- tsconfig.json
- 'tools/tester/**'
- 'spec/**'
pull_request:
branches: [ '**' ]
paths:
- 'package*.json'
- 'tsconfig.json'
- 'tools/tester/**'
- 'spec/**'
branches: ['**']
paths:
- 'package*.json'
- tsconfig.json
- 'tools/tester/**'
- 'spec/**'

jobs:
test-opensearch-spec:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ on:
branches: ['**']
paths:
- 'package*.json'
- 'eslint.config.mjs'
- 'jest.config.js'
- 'tsconfig.json'
- eslint.config.mjs
- jest.config.js
- tsconfig.json
- 'tools/**'
pull_request:
branches: ['**']
paths:
- 'package*.json'
- 'eslint.config.mjs'
- 'jest.config.js'
- 'tsconfig.json'
- eslint.config.mjs
- jest.config.js
- tsconfig.json
- 'tools/**'

jobs:
Expand Down
8 changes: 4 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default [
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unused-vars': ['error', { "argsIgnorePattern": "^_" }],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: "^_" }],
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/consistent-indexed-object-style': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
Expand Down Expand Up @@ -73,18 +73,18 @@ export default [
'no-constant-condition': 'off'
},
},
...eslintPluginYml.configs['flat/recommended'],
...eslintPluginYml.configs['flat/standard'],
{
files: ["**/*.yaml", "**/*.yml"],
ignores: ['*invalid*'],
languageOptions: {
parser: parserYml
},
plugins: {
yml: eslintPluginYml
},
rules: {
'yml/no-empty-document': 'off'
'yml/no-empty-document': 'off',
'yml/quotes': ['error', { prefer: 'single' }]
}
}
]
16 changes: 8 additions & 8 deletions json_schemas/test_story.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ properties:
items:
$ref: '#/definitions/Chapter'
minItems: 1
required: [ description, chapters]
required: [description, chapters]
additionalProperties: false

definitions:
Expand All @@ -37,7 +37,7 @@ definitions:
description: A brief description of the chapter.
response:
$ref: '#/definitions/ExpectedResponse'
required: [ synopsis ]
required: [synopsis]
additionalProperties: false

ReadChapter:
Expand All @@ -47,7 +47,7 @@ definitions:
properties:
response:
$ref: '#/definitions/ActualResponse'
required: [ response ]
required: [response]
additionalProperties: false

SupplementalChapter:
Expand All @@ -70,14 +70,14 @@ definitions:
type: string
method:
type: string
enum: [ GET, PUT, POST, DELETE, PATCH, HEAD, OPTIONS ]
enum: [GET, PUT, POST, DELETE, PATCH, HEAD, OPTIONS]
parameters:
type: object
additionalProperties:
$ref: '#/definitions/Parameter'
request_body:
$ref: '#/definitions/RequestBody'
required: [ path, method ]
required: [path, method]
additionalProperties: false


Expand All @@ -89,7 +89,7 @@ definitions:
default: application/json
payload:
$ref: '#/definitions/Payload'
required: [ payload ]
required: [payload]
additionalProperties: false

ExpectedResponse:
Expand All @@ -104,7 +104,7 @@ definitions:
default: application/json
payload:
$ref: '#/definitions/Payload'
required: [ status ]
required: [status]
additionalProperties: false

ActualResponse:
Expand All @@ -122,7 +122,7 @@ definitions:
error:
type: object
description: Error object.
required: [ status, content_type, payload ]
required: [status, content_type, payload]
additionalProperties: false

Payload:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ paths:
get:
x-operation-group: cat.aliases
operationId: cat.aliases.0
description: 'CAT aliases.'
description: CAT aliases.
responses:
'200':
$ref: '#/components/responses/cat.aliases@200'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
paths:
'/_rollover': {}
/_rollover: {}
'/{index}/_rollover': {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ paths:
get:
x-operation-group: cat.aliases
operationId: cat.aliases.0
description: 'CAT aliases.'
description: CAT aliases.
responses:
'200':
$ref: '#/components/responses/cat.aliases@200'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
paths:
'/_rollover': {}
/_rollover: {}
'/{index}/_rollover': {}
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,27 @@ paths:
'200':
$ref: '#/components/responses/adopt@200'
components:
requestBodies:
adopt: {
content: {
application/json: {
schema: {
type: object2
}
}
}
}
parameters:
adopt::path.animal:
name: animal
in: path
schema:
$ref: '../schemas/animals.yaml#/components/schemas/Animal'
adopt::path.docket:
name: docket
in: path
schema:
type: number2
responses:
adopt@200:
description: ''
content:
application/json:
schema:
type: object2
requestBodies:
adopt:
content:
application/json:
schema:
type: object2
parameters:
adopt::path.animal:
name: animal
in: path
schema:
$ref: '../schemas/animals.yaml#/components/schemas/Animal'
adopt::path.docket:
name: docket
in: path
schema:
type: number2
responses:
adopt@200:
description: ''
content:
application/json:
schema:
type: object2
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ info:
description: OpenSearch API
version: 1.0.0
components:
schemas:
Bark:
type: string
Meow:
type: string
schemas:
Bark:
type: string
Meow:
type: string
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ components:
- $ref: '#/components/schemas/Dog'
- $ref: '#/components/schemas/Cat'
Dog:
type: object
properties:
bark:
$ref: 'actions.yaml#/components/schemas/Bark'
type: object
properties:
bark:
$ref: 'actions.yaml#/components/schemas/Bark'
Cat:
type: object
properties:
meow:
$ref: 'actions.yaml#/components/schemas/Meow'
type: object
properties:
meow:
$ref: 'actions.yaml#/components/schemas/Meow'
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ paths:
'200':
$ref: '#/components/responses/adopt@200'
components:
requestBodies:
adopt: {}
parameters:
adopt::path.animal:
name: animal
in: path
requestBodies:
adopt: {}
parameters:
adopt::path.animal:
name: animal
in: path
schema:
$ref: '../schemas/animals.yaml#/components/schemas/Animal'
adopt::path.docket:
name: docket
in: path
schema:
type: number
responses:
adopt@200:
description: ''
application/json:
schema:
$ref: '../schemas/animals.yaml#/components/schemas/Animal'
adopt::path.docket:
name: docket
in: path
schema:
type: number
responses:
adopt@200:
description: ''
application/json:
schema:
type: object
type: object
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ info:
description: OpenSearch API
version: 1.0.0
components:
schemas:
Bark:
type: bogus
Meow:
type: string
schemas:
Bark:
type: bogus
Meow:
type: string
Loading

0 comments on commit c168d09

Please sign in to comment.