chore: update prettier scripts (#1636)

This commit is contained in:
Andrew Tatomyr
2024-07-22 10:55:18 +03:00
committed by GitHub
parent 368c34fc5f
commit c3ed020bbd
17 changed files with 171 additions and 108 deletions

View File

@@ -5,4 +5,5 @@ output/
*snapshot.js
packages/core/src/rules/__tests__/fixtures/invalid-yaml.yaml
__tests__/webpack-bundle/bundle-workflows/metafile.json
benchmark/api-definitions/
LICENSE.md

View File

@@ -14,8 +14,8 @@ components:
testMessages:
payload:
anyOf: # anyOf in payload schema
- $ref: "#/components/schemas/objectWithKey"
- $ref: "#/components/schemas/objectWithKey2"
- $ref: '#/components/schemas/objectWithKey'
- $ref: '#/components/schemas/objectWithKey2'
schemas:
objectWithKey:

View File

@@ -40,7 +40,7 @@ components:
title: Light measured
summary: Inform about environmental lighting conditions of a particular streetlight.
correlationId:
location: "$message.header#/MQMD/CorrelId"
location: '$message.header#/MQMD/CorrelId'
contentType: application/json
headers:
type: object
@@ -54,9 +54,9 @@ components:
maxLength: 24
format: binary
applicationInstanceId:
$ref: "#/components/schemas/applicationInstanceId"
$ref: '#/components/schemas/applicationInstanceId'
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
$ref: '#/components/schemas/lightMeasuredPayload'
schemas:
lightMeasuredPayload:
@@ -67,7 +67,7 @@ components:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
sentAt:
type: string
format: date-time

View File

@@ -22,9 +22,9 @@ servers:
security:
- apiKey: []
- supportedOauthFlows:
- streetlights:on
- streetlights:off
- streetlights:dim
- streetlights:on
- streetlights:off
- streetlights:dim
- openIdConnectWellKnown: []
defaultContentType: application/json
@@ -56,18 +56,18 @@ components:
title: Light measured
summary: Inform about environmental lighting conditions of a particular streetlight.
correlationId:
location: "$message.header#/MQMD/CorrelId"
location: '$message.header#/MQMD/CorrelId'
contentType: application/json
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
$ref: '#/components/schemas/lightMeasuredPayload'
dimLight:
name: dimLight
title: Dim light
summary: Command a particular streetlight to dim the lights.
correlationId:
$ref: "#/components/correlationIds/sentAtCorrelator"
$ref: '#/components/correlationIds/sentAtCorrelator'
payload:
$ref: "#/components/schemas/dimLightPayload"
$ref: '#/components/schemas/dimLightPayload'
schemas:
lightMeasuredPayload:
@@ -78,7 +78,7 @@ components:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
dimLightPayload:
type: object
properties:
@@ -88,7 +88,7 @@ components:
minimum: 0
maximum: 100
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
sentAt:
type: string
format: date-time

View File

@@ -155,7 +155,7 @@ components:
bindings:
http:
$ref: '#/components/messageBindings/streamingHeaders'
messageBindings:
streamingHeaders:
http:

View File

@@ -21,7 +21,7 @@ channels:
type: integer
subscribe:
message:
$ref: '#/components/messages/book'
$ref: '#/components/messages/book'
publish:
message:
$ref: '#/components/messages/book'

View File

@@ -13,7 +13,7 @@ components:
messages:
testMessages:
payload:
$ref: "#/components/schemas/testSchema"
$ref: '#/components/schemas/testSchema'
schemas:
testSchema:

View File

@@ -15,23 +15,23 @@ channels:
# Use oneOf here if different messages are published on test2 topic.
oneOf:
- payload:
$ref: "#/components/schemas/objectWithKey"
$ref: '#/components/schemas/objectWithKey'
- payload:
$ref: "#/components/schemas/objectWithKey2"
$ref: '#/components/schemas/objectWithKey2'
components:
messages:
testMessages:
payload:
oneOf: # oneOf in payload schema
- $ref: "#/components/schemas/objectWithKey"
- $ref: "#/components/schemas/objectWithKey2"
- $ref: '#/components/schemas/objectWithKey'
- $ref: '#/components/schemas/objectWithKey2'
testMessage1:
payload:
$ref: "#/components/schemas/objectWithKey"
$ref: '#/components/schemas/objectWithKey'
testMessage2:
payload:
$ref: "#/components/schemas/objectWithKey2"
$ref: '#/components/schemas/objectWithKey2'
schemas:
objectWithKey:

View File

@@ -66,4 +66,4 @@ channels:
items:
type: number
examples:
- [4,3]
- [4, 3]

View File

@@ -63,4 +63,4 @@ channels:
items:
type: number
examples:
- [4,3]
- [4, 3]

View File

@@ -248,7 +248,7 @@ components:
channel:
type: string
channelHistoryChanged:
summary: 'Bulk updates were made to a channel''s history.'
summary: "Bulk updates were made to a channel's history."
payload:
type: object
properties:
@@ -623,7 +623,7 @@ components:
channel:
type: string
groupHistoryChanged:
summary: 'Bulk updates were made to a private channel''s history.'
summary: "Bulk updates were made to a private channel's history."
payload:
type: object
properties:

View File

@@ -22,12 +22,12 @@ servers:
security:
- saslScram: []
tags:
- name: "env:test-scram"
description: "This environment is meant for running internal tests through scramSha256"
- name: "kind:remote"
description: "This server is a remote server. Not exposed by the application"
- name: "visibility:private"
description: "This resource is private and only available to certain users"
- name: 'env:test-scram'
description: 'This environment is meant for running internal tests through scramSha256'
- name: 'kind:remote'
description: 'This server is a remote server. Not exposed by the application'
- name: 'visibility:private'
description: 'This resource is private and only available to certain users'
mtls-connections:
url: test.mykafkacluster.org:28092
protocol: kafka-secure
@@ -35,12 +35,12 @@ servers:
security:
- certs: []
tags:
- name: "env:test-mtls"
description: "This environment is meant for running internal tests through mtls"
- name: "kind:remote"
description: "This server is a remote server. Not exposed by the application"
- name: "visibility:private"
description: "This resource is private and only available to certain users"
- name: 'env:test-mtls'
description: 'This environment is meant for running internal tests through mtls'
- name: 'kind:remote'
description: 'This server is a remote server. Not exposed by the application'
- name: 'visibility:private'
description: 'This resource is private and only available to certain users'
defaultContentType: application/json
@@ -101,7 +101,7 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
$ref: '#/components/schemas/lightMeasuredPayload'
turnOnOff:
name: turnOnOff
title: Turn on/off
@@ -109,7 +109,7 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/turnOnOffPayload"
$ref: '#/components/schemas/turnOnOffPayload'
dimLight:
name: dimLight
title: Dim light
@@ -117,7 +117,7 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/dimLightPayload"
$ref: '#/components/schemas/dimLightPayload'
schemas:
lightMeasuredPayload:
@@ -128,7 +128,7 @@ components:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
turnOnOffPayload:
type: object
properties:
@@ -139,7 +139,7 @@ components:
- off
description: Whether to turn on or off the light.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
dimLightPayload:
type: object
properties:
@@ -149,7 +149,7 @@ components:
minimum: 0
maximum: 100
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
sentAt:
type: string
format: date-time

View File

@@ -29,17 +29,17 @@ servers:
security:
- apiKey: []
- supportedOauthFlows:
- streetlights:on
- streetlights:off
- streetlights:dim
- streetlights:on
- streetlights:off
- streetlights:dim
- openIdConnectWellKnown: []
tags:
- name: "env:production"
description: "This environment is meant for production use case"
- name: "kind:remote"
description: "This server is a remote server. Not exposed by the application"
- name: "visibility:public"
description: "This resource is public and available to everyone"
- name: 'env:production'
description: 'This environment is meant for production use case'
- name: 'kind:remote'
description: 'This server is a remote server. Not exposed by the application'
- name: 'visibility:public'
description: 'This resource is public and available to everyone'
defaultContentType: application/json
@@ -100,7 +100,7 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
$ref: '#/components/schemas/lightMeasuredPayload'
turnOnOff:
name: turnOnOff
title: Turn on/off
@@ -108,7 +108,7 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/turnOnOffPayload"
$ref: '#/components/schemas/turnOnOffPayload'
dimLight:
name: dimLight
title: Dim light
@@ -116,7 +116,7 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/dimLightPayload"
$ref: '#/components/schemas/dimLightPayload'
schemas:
lightMeasuredPayload:
@@ -127,7 +127,7 @@ components:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
turnOnOffPayload:
type: object
properties:
@@ -138,7 +138,7 @@ components:
- off
description: Whether to turn on or off the light.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
dimLightPayload:
type: object
properties:
@@ -148,7 +148,7 @@ components:
minimum: 0
maximum: 100
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
sentAt:
type: string
format: date-time

View File

@@ -24,20 +24,19 @@ servers:
test_oauth:
url: test.mykafkacluster.org:8093
protocol: kafka-secure
description: Test port for oauth
description: Test port for oauth
security:
- streetlights_auth:
- streetlights:write
- streetlights:read
- streetlights:write
- streetlights:read
defaultContentType: application/json
channels:
smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured:
description: The topic on which measured values may be produced and consumed.
servers:
- test
- test
parameters:
streetlightId:
$ref: '#/components/parameters/streetlightId'
@@ -48,10 +47,10 @@ channels:
- $ref: '#/components/operationTraits/kafka'
message:
$ref: '#/components/messages/lightMeasured'
smartylighting.streetlights.1.0.action.{streetlightId}.turn.on:
servers:
- test_oauth
- test_oauth
parameters:
streetlightId:
$ref: '#/components/parameters/streetlightId'
@@ -62,16 +61,16 @@ channels:
message:
$ref: '#/components/messages/turnOnOff'
security:
# This operation level security implies the ability to subscribe to messages from
# `smartylighting.streetlights.1.0.action.{streetlightId}.turn.on` channel with Authorization headers
# that have `streetlights:read` scope. Note that an operation level security must still satisfy
# security requirements specified at the server level.
# This operation level security implies the ability to subscribe to messages from
# `smartylighting.streetlights.1.0.action.{streetlightId}.turn.on` channel with Authorization headers
# that have `streetlights:read` scope. Note that an operation level security must still satisfy
# security requirements specified at the server level.
- streetlights_auth:
- streetlights:read
- streetlights:read
smartylighting.streetlights.1.0.action.{streetlightId}.turn.off:
servers:
- test_oauth
- test_oauth
parameters:
streetlightId:
$ref: '#/components/parameters/streetlightId'
@@ -82,15 +81,15 @@ channels:
message:
$ref: '#/components/messages/turnOnOff'
security:
# This operation level security implies the ability to subscribe to messages from
# `smartylighting.streetlights.1.0.action.{streetlightId}.turn.off` channel with Authorization headers
# that have `streetlights:read` scope. Note that an operation level security must still satisfy
# security options specified at the server level.
# This operation level security implies the ability to subscribe to messages from
# `smartylighting.streetlights.1.0.action.{streetlightId}.turn.off` channel with Authorization headers
# that have `streetlights:read` scope. Note that an operation level security must still satisfy
# security options specified at the server level.
- streetlights_auth:
- streetlights:read
- streetlights:read
smartylighting.streetlights.1.0.action.{streetlightId}.dim:
servers:
- test_oauth
- test_oauth
parameters:
streetlightId:
$ref: '#/components/parameters/streetlightId'
@@ -101,13 +100,12 @@ channels:
message:
$ref: '#/components/messages/dimLight'
security:
# This operation level security implies the ability to subscribe to messages from
# `smartylighting.streetlights.1.0.action.{streetlightId}.dim` channel with Authorization headers
# that have `streetlights:read` scope. Note that an operation level security must still satisfy
# security options specified at the server level.
# This operation level security implies the ability to subscribe to messages from
# `smartylighting.streetlights.1.0.action.{streetlightId}.dim` channel with Authorization headers
# that have `streetlights:read` scope. Note that an operation level security must still satisfy
# security options specified at the server level.
- streetlights_auth:
- streetlights:read
- streetlights:read
components:
messages:
@@ -119,7 +117,7 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
$ref: '#/components/schemas/lightMeasuredPayload'
turnOnOff:
name: turnOnOff
title: Turn on/off
@@ -127,7 +125,7 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/turnOnOffPayload"
$ref: '#/components/schemas/turnOnOffPayload'
dimLight:
name: dimLight
title: Dim light
@@ -135,7 +133,7 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/dimLightPayload"
$ref: '#/components/schemas/dimLightPayload'
schemas:
lightMeasuredPayload:
@@ -146,7 +144,7 @@ components:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
turnOnOffPayload:
type: object
properties:
@@ -157,7 +155,7 @@ components:
- off
description: Whether to turn on or off the light.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
dimLightPayload:
type: object
properties:
@@ -167,7 +165,7 @@ components:
minimum: 0
maximum: 100
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
sentAt:
type: string
format: date-time
@@ -181,11 +179,11 @@ components:
type: oauth2
description: The oauth security descriptions
flows:
clientCredentials:
tokenUrl: 'https://example.com/api/oauth/dialog'
scopes:
streetlights:read: Scope required for subscribing to channel
streetlights:write: Scope required for publishing to channel
clientCredentials:
tokenUrl: 'https://example.com/api/oauth/dialog'
scopes:
streetlights:read: Scope required for subscribing to channel
streetlights:write: Scope required for publishing to channel
parameters:
streetlightId:

View File

@@ -25,18 +25,18 @@ info:
url: https://www.gemini.com/
description: |
Market data is a public API that streams all the market data on a given symbol.
You can quickly play with the API using [websocat](https://github.com/vi/websocat#installation) like this:
```bash
websocat wss://api.gemini.com/v1/marketdata/btcusd?heartbeat=true -S
```
#
# Link to external docs
#
externalDocs:
url: https://docs.sandbox.gemini.com/websocket-api/#market-data
#
# Details on how to connect to the application
#
@@ -56,7 +56,70 @@ channels:
Symbols are formatted as CCY1CCY2 where prices are in CCY2 and quantities are in CCY1. To read more click [here](https://docs.sandbox.gemini.com/websocket-api/#symbols-and-minimums).
schema:
type: string
enum: ['btcusd', 'ethbtc', 'ethusd', 'zecusd', 'zecbtc', 'zeceth', 'zecbch', 'zecltc', 'bchusd', 'bchbtc', 'bcheth', 'ltcusd', 'ltcbtc', 'ltceth', 'ltcbch', 'batusd', 'daiusd', 'linkusd', 'oxtusd', 'batbtc', 'linkbtc', 'oxtbtc', 'bateth', 'linketh', 'oxteth', 'ampusd', 'compusd', 'paxgusd', 'mkrusd', 'zrxusd', 'kncusd', 'manausd', 'storjusd', 'snxusd', 'crvusd', 'balusd', 'uniusd', 'renusd', 'umausd', 'yfiusd', 'btcdai', 'ethdai', 'aaveusd', 'filusd', 'btceur', 'btcgbp', 'etheur', 'ethgbp', 'btcsgd', 'ethsgd', 'sklusd', 'grtusd', 'bntusd', '1inchusd', 'enjusd', 'lrcusd', 'sandusd', 'cubeusd', 'lptusd', 'bondusd', 'maticusd', 'injusd', 'sushiusd']
enum:
- btcusd
- ethbtc
- ethusd
- zecusd
- zecbtc
- zeceth
- zecbch
- zecltc
- bchusd
- bchbtc
- bcheth
- ltcusd
- ltcbtc
- ltceth
- ltcbch
- batusd
- daiusd
- linkusd
- oxtusd
- batbtc
- linkbtc
- oxtbtc
- bateth
- linketh
- oxteth
- ampusd
- compusd
- paxgusd
- mkrusd
- zrxusd
- kncusd
- manausd
- storjusd
- snxusd
- crvusd
- balusd
- uniusd
- renusd
- umausd
- yfiusd
- btcdai
- ethdai
- aaveusd
- filusd
- btceur
- btcgbp
- etheur
- ethgbp
- btcsgd
- ethsgd
- sklusd
- grtusd
- bntusd
- 1inchusd
- enjusd
- lrcusd
- sandusd
- cubeusd
- lptusd
- bondusd
- maticusd
- injusd
- sushiusd
bindings:
ws:
bindingVersion: 0.1.0
@@ -127,7 +190,7 @@ components:
delta: 0.002
reason: place
- name: heartbeatMessage
summary: Example of additional heartbeat message when you enable them.
summary: Example of additional heartbeat message when you enable them.
payload:
type: heartbeat
socket_sequence: 1656
@@ -174,8 +237,8 @@ components:
type: object
description: This object is always part of the payload. In case of type=heartbeat, these are the only fields.
required:
- type
- socket_sequence
- type
- socket_sequence
properties:
socket_sequence:
type: integer
@@ -201,7 +264,7 @@ components:
type: string
enum: ['place', 'trade', 'cancel', 'initial']
description: Indicates why the change has occurred. initial is for the initial response message, which will show the entire existing state of the order book.
remaining:
remaining:
type: number
description: The quantity remaining at that price level after this change occurred. May be zero if all orders at this price level have been filled or canceled.
delta:

View File

@@ -24,6 +24,7 @@
"cli-1.15": "npm:@redocly/cli@1.15.0",
"cli-1.16": "npm:@redocly/cli@1.16.0",
"cli-1.17": "npm:@redocly/cli@1.17.1",
"cli-1.18": "npm:@redocly/cli@1.18.0",
"cli-next": "file:../redocly-cli.tgz"
}
}

View File

@@ -17,8 +17,8 @@
"coverage:core": "npm run jest -- --roots packages/core/src --coverage",
"typecheck": "tsc --noEmit --skipLibCheck",
"e2e": "npm run webpack-bundle -- --mode=none && REDOCLY_TELEMETRY=off jest --roots=./__tests__/",
"prettier": "npx prettier --write \"**/*.{ts,js,yaml,json,md}\"",
"prettier:check": "npx prettier --check \"**/*.{ts,js,yaml,json,md}\"",
"prettier": " npx prettier --write \"**/*.{ts,js,yaml,yml,json,md}\"",
"prettier:check": "npx prettier --check \"**/*.{ts,js,yaml,yml,json,md}\"",
"eslint": "eslint packages/**",
"clean": "rm -rf packages/**/lib packages/**/node_modules packages/**/*.tsbuildinfo package-lock.json node_modules dist && git checkout package-lock.json",
"watch": "tsc -b tsconfig.build.json --watch ",