diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index adf7c6a90..29986b18f 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -21,13 +21,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-latest] + os: [ubuntu-20.04, windows-2019] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 18 - uses: microsoft/playwright-github-action@v1 - uses: actions/cache@v1 with: @@ -52,7 +52,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v2 with: - node-version: '14.x' + node-version: '18.x' registry-url: 'https://registry.npmjs.org' - uses: actions/cache@v1 with: diff --git a/.gitignore b/.gitignore index 14f3ca7db..a656c3a18 100644 --- a/.gitignore +++ b/.gitignore @@ -62,5 +62,6 @@ dist/ # AMF models demo/models/*.json demo/models/flattened/*.json +!demo/models/jldAsync26.json .idea/ diff --git a/demo/apis.json b/demo/apis.json index e91155560..2f11d3043 100644 --- a/demo/apis.json +++ b/demo/apis.json @@ -33,5 +33,6 @@ "models/representative-service/representative-service.yaml": "OAS 3.0", "models/APIC-763/APIC-763.raml": "RAML 1.0", "models/multipart-api/multipart-api.raml": "RAML 1.0", - "models/multiple-messages/multiple-messages.yaml": "ASYNC 2.0" + "models/multiple-messages/multiple-messages.yaml": "ASYNC 2.0", + "models/APIC-560/APIC-560.yaml": "ASYNC 2.0" } diff --git a/demo/models/APIC-560/APIC-560.yaml b/demo/models/APIC-560/APIC-560.yaml new file mode 100644 index 000000000..20396cdc7 --- /dev/null +++ b/demo/models/APIC-560/APIC-560.yaml @@ -0,0 +1,209 @@ +asyncapi: 2.0.0 +info: + title: Streetlights API + version: '1.0.0' + description: | + The Smartylighting Streetlights API allows you to remotely manage the city lights. + + ### Check out its awesome features: + + * Turn a specific streetlight on/off 🌃 + * Dim a specific streetlight 😎 + * Receive real-time information about environmental lighting conditions 📈 + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + +servers: + production: + url: api.streetlights.smartylighting.com:{port} + protocol: http + description: Test broker + variables: + port: + description: Secure connection (TLS) is available through port 8883. + default: '1883' + enum: + - '1883' + - '8883' + security: + - apiKey: [] + - supportedOauthFlows: + - streetlights:on + - streetlights:off + - streetlights:dim + - openIdConnectWellKnown: [] + +defaultContentType: application/json + +channels: + smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured: + description: The topic on which measured values may be produced and consumed. + parameters: + streetlightId: + $ref: '#/components/parameters/streetlightId' + subscribe: + summary: Receive information about environmental lighting conditions of a particular streetlight. + operationId: receiveLightMeasurement + traits: + - $ref: '#/components/operationTraits/kafka' + message: + $ref: '#/components/messages/lightMeasured' + + smartylighting/streetlights/1/0/action/{streetlightId}/turn/on: + parameters: + streetlightId: + $ref: '#/components/parameters/streetlightId' + publish: + operationId: turnOn + traits: + - $ref: '#/components/operationTraits/kafka' + message: + $ref: '#/components/messages/turnOnOff' + + smartylighting/streetlights/1/0/action/{streetlightId}/turn/off: + parameters: + streetlightId: + $ref: '#/components/parameters/streetlightId' + publish: + operationId: turnOff + traits: + - $ref: '#/components/operationTraits/kafka' + message: + $ref: '#/components/messages/turnOnOff' + + smartylighting/streetlights/1/0/action/{streetlightId}/dim: + parameters: + streetlightId: + $ref: '#/components/parameters/streetlightId' + publish: + operationId: dimLight + traits: + - $ref: '#/components/operationTraits/kafka' + message: + $ref: '#/components/messages/dimLight' + +components: + messages: + lightMeasured: + name: lightMeasured + title: Light measured + summary: Inform about environmental lighting conditions for a particular streetlight. + contentType: application/json + traits: + - $ref: '#/components/messageTraits/commonHeaders' + payload: + $ref: "#/components/schemas/lightMeasuredPayload" + turnOnOff: + name: turnOnOff + title: Turn on/off + summary: Command a particular streetlight to turn the lights on or off. + traits: + - $ref: '#/components/messageTraits/commonHeaders' + payload: + $ref: "#/components/schemas/turnOnOffPayload" + dimLight: + name: dimLight + title: Dim light + summary: Command a particular streetlight to dim the lights. + traits: + - $ref: '#/components/messageTraits/commonHeaders' + payload: + $ref: "#/components/schemas/dimLightPayload" + + schemas: + lightMeasuredPayload: + type: object + properties: + lumens: + type: integer + minimum: 0 + description: Light intensity measured in lumens. + sentAt: + $ref: "#/components/schemas/sentAt" + turnOnOffPayload: + type: object + properties: + command: + type: string + enum: + - on + - off + description: Whether to turn on or off the light. + sentAt: + $ref: "#/components/schemas/sentAt" + dimLightPayload: + type: object + properties: + percentage: + type: integer + description: Percentage to which the light should be dimmed to. + minimum: 0 + maximum: 100 + sentAt: + $ref: "#/components/schemas/sentAt" + sentAt: + type: string + format: date-time + description: Date and time when the message was sent. + + securitySchemes: + apiKey: + type: apiKey + in: user + description: Provide your API key as the user and leave the password empty. + supportedOauthFlows: + type: oauth2 + description: Flows to support OAuth 2.0 + flows: + implicit: + authorizationUrl: 'https://authserver.example/auth' + scopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + password: + tokenUrl: 'https://authserver.example/token' + scopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + clientCredentials: + tokenUrl: 'https://authserver.example/token' + scopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + authorizationCode: + authorizationUrl: 'https://authserver.example/auth' + tokenUrl: 'https://authserver.example/token' + refreshUrl: 'https://authserver.example/refresh' + scopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + openIdConnectWellKnown: + type: openIdConnect + openIdConnectUrl: 'https://authserver.example/.well-known' + + parameters: + streetlightId: + description: The ID of the streetlight. + schema: + type: string + + messageTraits: + commonHeaders: + headers: + type: object + properties: + my-app-header: + type: integer + minimum: 0 + maximum: 100 + + operationTraits: + kafka: + bindings: + kafka: + clientId: my-app-id diff --git a/demo/models/jldAsync26.json b/demo/models/jldAsync26.json new file mode 100644 index 000000000..359c3c2dd --- /dev/null +++ b/demo/models/jldAsync26.json @@ -0,0 +1,1344 @@ +{ +"@graph": [ +{ +"@id": "#34", +"@type": [ +"doc:APIContractProcessingData" +], +"apiContract:modelVersion": "3.9.0", +"doc:transformed": true, +"doc:sourceSpec": "ASYNC 2.6" +}, +{ +"@id": "#35", +"@type": [ +"apiContract:AsyncAPI", +"apiContract:API", +"doc:RootDomainElement", +"doc:DomainElement" +], +"core:name": "Hello world application", +"apiContract:server": [ +{ +"@id": "#37" +}, +{ +"@id": "#41" +} +], +"apiContract:accepts": [ +"application/html" +], +"apiContract:contentType": [ +"application/html" +], +"core:version": "0.1.0", +"apiContract:endpoint": [ +{ +"@id": "#36" +}, +{ +"@id": "#42" +}, +{ +"@id": "#52" +}, +{ +"@id": "#55" +}, +{ +"@id": "#58" +} +] +}, +{ +"@id": "#37", +"@type": [ +"apiContract:Server", +"doc:DomainElement" +], +"core:name": "production", +"core:urlTemplate": "broker.mycompany.com", +"core:description": "This is \"My Company\" broker.", +"apiContract:tags": [ +{ +"@id": "#38" +}, +{ +"@id": "#39" +}, +{ +"@id": "#40" +} +], +"apiContract:protocol": "amqp", +"security:security": [ +{ +"@id": "#26" +}, +{ +"@id": "#28" +} +] +}, +{ +"@id": "#41", +"@type": [ +"apiContract:Server", +"doc:DomainElement" +], +"core:name": "development", +"core:urlTemplate": "broker.mycompany.com", +"core:description": "This is \"My Company\" broker.", +"apiContract:protocol": "amqp", +"security:security": [ +{ +"@id": "#32" +} +] +}, +{ +"@id": "#36", +"@type": [ +"apiContract:EndPoint", +"doc:DomainElement" +], +"apiContract:path": "refed", +"apiContract:supportedOperation": [ +{ +"@id": "#25" +} +], +"apiContract:server": [ +{ +"@id": "#37" +}, +{ +"@id": "#41" +} +] +}, +{ +"@id": "#42", +"@type": [ +"apiContract:EndPoint", +"doc:DomainElement" +], +"apiContract:path": "hello", +"apiContract:supportedOperation": [ +{ +"@id": "#43" +} +], +"apiContract:server": [ +{ +"@id": "#37" +} +] +}, +{ +"@id": "#52", +"@type": [ +"apiContract:EndPoint", +"doc:DomainElement" +], +"apiContract:path": "anotherOne", +"apiContract:supportedOperation": [ +{ +"@id": "#53" +} +], +"apiContract:server": [ +{ +"@id": "#37" +}, +{ +"@id": "#41" +} +] +}, +{ +"@id": "#55", +"@type": [ +"apiContract:EndPoint", +"doc:DomainElement" +], +"apiContract:path": "subscribedTo", +"apiContract:supportedOperation": [ +{ +"@id": "#56" +} +], +"apiContract:server": [ +{ +"@id": "#37" +}, +{ +"@id": "#41" +} +] +}, +{ +"@id": "#58", +"@type": [ +"apiContract:EndPoint", +"doc:DomainElement" +], +"apiContract:path": "avro", +"apiContract:supportedOperation": [ +{ +"@id": "#59" +} +], +"apiContract:server": [ +{ +"@id": "#37" +}, +{ +"@id": "#41" +} +] +}, +{ +"@id": "#38", +"@type": [ +"apiContract:Tag", +"doc:DomainElement" +], +"core:name": "env:test-scram", +"core:description": "This environment is for running internal tests through scramSha256" +}, +{ +"@id": "#39", +"@type": [ +"apiContract:Tag", +"doc:DomainElement" +], +"core:name": "kind:remote", +"core:description": "This server is a remote server. Not exposed by the application" +}, +{ +"@id": "#40", +"@type": [ +"apiContract:Tag", +"doc:DomainElement" +], +"core:name": "visibility:private", +"core:description": "This resource is private and only available to certain users" +}, +{ +"@id": "#26", +"@type": [ +"security:SecurityRequirement", +"doc:DomainElement" +], +"security:schemes": [ +{ +"@id": "#27" +} +] +}, +{ +"@id": "#28", +"@type": [ +"security:SecurityRequirement", +"doc:DomainElement" +], +"security:schemes": [ +{ +"@id": "#29" +} +] +}, +{ +"@id": "#32", +"@type": [ +"security:SecurityRequirement", +"doc:DomainElement" +], +"security:schemes": [ +{ +"@id": "#33" +} +] +}, +{ +"@id": "#25", +"@type": [ +"apiContract:Operation", +"core:Operation", +"doc:DomainElement" +], +"apiContract:method": "publish", +"apiContract:expects": [ +{ +"@id": "#12" +} +], +"security:security": [ +{ +"@id": "#26" +}, +{ +"@id": "#28" +}, +{ +"@id": "#32" +} +] +}, +{ +"@id": "#43", +"@type": [ +"apiContract:Operation", +"core:Operation", +"doc:DomainElement" +], +"apiContract:method": "publish", +"apiContract:expects": [ +{ +"@id": "#44" +} +], +"security:security": [ +{ +"@id": "#47" +} +] +}, +{ +"@id": "#53", +"@type": [ +"apiContract:Operation", +"core:Operation", +"doc:DomainElement" +], +"apiContract:method": "publish", +"apiContract:expects": [ +{ +"@id": "#54" +} +], +"security:security": [ +{ +"@id": "#26" +}, +{ +"@id": "#28" +}, +{ +"@id": "#32" +} +] +}, +{ +"@id": "#56", +"@type": [ +"apiContract:Operation", +"core:Operation", +"doc:DomainElement" +], +"apiContract:method": "subscribe", +"apiContract:returns": [ +{ +"@id": "#57" +} +], +"security:security": [ +{ +"@id": "#26" +}, +{ +"@id": "#28" +}, +{ +"@id": "#32" +} +] +}, +{ +"@id": "#59", +"@type": [ +"apiContract:Operation", +"core:Operation", +"doc:DomainElement" +], +"apiContract:method": "subscribe", +"apiContract:returns": [ +{ +"@id": "#60" +} +], +"security:security": [ +{ +"@id": "#26" +}, +{ +"@id": "#28" +}, +{ +"@id": "#32" +} +] +}, +{ +"@id": "#27", +"@type": [ +"security:ParametrizedSecurityScheme", +"doc:DomainElement" +], +"core:name": "user-password", +"security:scheme": { +"@id": "#1" +} +}, +{ +"@id": "#29", +"@type": [ +"security:ParametrizedSecurityScheme", +"doc:DomainElement" +], +"core:name": "petstore_auth", +"security:scheme": { +"@id": "#2" +}, +"security:settings": { +"@id": "#30" +} +}, +{ +"@id": "#33", +"@type": [ +"security:ParametrizedSecurityScheme", +"doc:DomainElement" +], +"core:name": "kafka-scram", +"security:scheme": { +"@id": "#6" +} +}, +{ +"@id": "#12", +"@type": [ +"apiContract:Request", +"core:Request", +"apiContract:Message", +"doc:DomainElement" +], +"core:name": "hello-msg", +"core:description": "This is the description", +"apiContract:payload": [ +{ +"@id": "#13" +} +], +"core:summary": "This is the summary of the hello message", +"apiBinding:binding": { +"@id": "#8" +} +}, +{ +"@id": "#44", +"@type": [ +"apiContract:Request", +"core:Request", +"apiContract:Message", +"doc:DomainElement" +], +"core:description": "This is the description", +"apiContract:payload": [ +{ +"@id": "#45" +} +], +"core:summary": "This is the summary of the hello message", +"apiContract:messageId": "messageIdHello" +}, +{ +"@id": "#47", +"@type": [ +"security:SecurityRequirement", +"doc:DomainElement" +], +"security:schemes": [ +{ +"@id": "#48" +} +] +}, +{ +"@id": "#54", +"@type": [ +"apiContract:Request", +"core:Request", +"apiContract:Message", +"doc:DomainElement" +], +"core:name": "user-signup", +"core:description": "This is the description", +"apiContract:payload": [ +{ +"@id": "#16" +} +], +"core:summary": "This is the summary of the anotherOne message" +}, +{ +"@id": "#57", +"@type": [ +"apiContract:Response", +"core:Response", +"apiContract:Message", +"doc:DomainElement" +], +"core:name": "user-signup", +"core:description": "This is the description", +"apiContract:payload": [ +{ +"@id": "#16" +} +], +"core:summary": "This is the summary of the anotherOne message" +}, +{ +"@id": "#60", +"@type": [ +"apiContract:Response", +"core:Response", +"apiContract:Message", +"doc:DomainElement" +], +"core:description": "A longer description", +"apiContract:payload": [ +{ +"@id": "#74" +} +], +"core:correlationId": { +"@id": "#61" +}, +"core:displayName": "UserSignup", +"core:title": "User signup", +"core:summary": "Action to sign a user up.", +"apiContract:tag": [ +{ +"@id": "#62" +}, +{ +"@id": "#63" +}, +{ +"@id": "#64" +} +], +"apiContract:headerSchema": { +"@id": "#65" +} +}, +{ +"@id": "#1", +"@type": [ +"security:SecurityScheme", +"doc:DomainElement" +], +"core:name": "user-password", +"security:type": "userPassword" +}, +{ +"@id": "#2", +"@type": [ +"security:SecurityScheme", +"doc:DomainElement" +], +"core:name": "petstore_auth", +"security:type": "OAuth 2.0", +"core:description": "The oauth security descriptions", +"security:settings": { +"@id": "#3" +} +}, +{ +"@id": "#30", +"@type": [ +"security:OAuth2Settings", +"security:Settings", +"doc:DomainElement" +], +"security:flows": [ +{ +"@id": "#31" +} +] +}, +{ +"@id": "#6", +"@type": [ +"security:SecurityScheme", +"doc:DomainElement" +], +"core:name": "kafka-scram", +"security:type": "scramSha512" +}, +{ +"@id": "#13", +"@type": [ +"apiContract:Payload", +"core:Payload", +"doc:DomainElement" +], +"core:mediaType": "application/html", +"raml-shapes:schema": { +"@id": "#14" +} +}, +{ +"@id": "#8", +"@type": [ +"apiBinding:MessageBindings", +"doc:DomainElement" +], +"apiBinding:bindings": [ +{ +"@id": "#9" +} +] +}, +{ +"@id": "#45", +"@type": [ +"apiContract:Payload", +"core:Payload", +"doc:DomainElement" +], +"core:mediaType": "application/html", +"raml-shapes:schema": { +"@id": "#46" +} +}, +{ +"@id": "#48", +"@type": [ +"security:ParametrizedSecurityScheme", +"doc:DomainElement" +], +"core:name": "petstore_auth", +"security:scheme": { +"@id": "#2" +}, +"security:settings": { +"@id": "#49" +} +}, +{ +"@id": "#16", +"@type": [ +"apiContract:Payload", +"core:Payload", +"doc:DomainElement" +], +"core:mediaType": "application/html", +"raml-shapes:schema": { +"@id": "#17" +} +}, +{ +"@id": "#74", +"@type": [ +"apiContract:Payload", +"core:Payload", +"doc:DomainElement" +], +"core:mediaType": "application/json", +"raml-shapes:schema": { +"@id": "#75" +} +}, +{ +"@id": "#61", +"@type": [ +"core:CorrelationId", +"doc:DomainElement" +], +"core:description": "Default Correlation ID", +"core:location": "$message.header#/correlationId" +}, +{ +"@id": "#62", +"@type": [ +"apiContract:Tag", +"doc:DomainElement" +], +"core:name": "user" +}, +{ +"@id": "#63", +"@type": [ +"apiContract:Tag", +"doc:DomainElement" +], +"core:name": "signup" +}, +{ +"@id": "#64", +"@type": [ +"apiContract:Tag", +"doc:DomainElement" +], +"core:name": "register" +}, +{ +"@id": "#65", +"@type": [ +"shacl:NodeShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:closed": false, +"shacl:property": [ +{ +"@id": "#66" +}, +{ +"@id": "#68" +} +], +"shacl:name": "schema", +"apiContract:examples": [ +{ +"@id": "#70" +} +] +}, +{ +"@id": "#3", +"@type": [ +"security:OAuth2Settings", +"security:Settings", +"doc:DomainElement" +], +"security:flows": [ +{ +"@id": "#4" +} +] +}, +{ +"@id": "#31", +"@type": [ +"security:OAuth2Flow", +"doc:DomainElement" +], +"security:scope": [] +}, +{ +"@id": "#14", +"@type": [ +"raml-shapes:ScalarShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"shacl:pattern": "^hello .+$", +"shacl:name": "schema", +"apiContract:examples": [ +{ +"@id": "#10" +} +] +}, +{ +"@id": "#9", +"@type": [ +"apiBinding:EmptyBinding", +"doc:DomainElement" +], +"apiBinding:type": "pulsar" +}, +{ +"@id": "#46", +"@type": [ +"raml-shapes:ScalarShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"shacl:pattern": "^hello .+$", +"shacl:name": "schema" +}, +{ +"@id": "#49", +"@type": [ +"security:OAuth2Settings", +"security:Settings", +"doc:DomainElement" +], +"security:flows": [ +{ +"@id": "#50" +} +] +}, +{ +"@id": "#17", +"@type": [ +"shacl:NodeShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:closed": true, +"shacl:property": [ +{ +"@id": "#18" +}, +{ +"@id": "#20" +}, +{ +"@id": "#22" +} +], +"shacl:name": "schema" +}, +{ +"@id": "#75", +"@type": [ +"raml-shapes:ScalarShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"shacl:name": "schema", +"apiContract:examples": [ +{ +"@id": "#76" +} +] +}, +{ +"@id": "#66", +"@type": [ +"shacl:PropertyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:path": [ +{ +"@id": "http://a.ml/vocabularies/data#correlationId" +} +], +"raml-shapes:range": { +"@id": "#67" +}, +"shacl:minCount": 0, +"shacl:name": "correlationId" +}, +{ +"@id": "#68", +"@type": [ +"shacl:PropertyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:path": [ +{ +"@id": "http://a.ml/vocabularies/data#applicationInstanceId" +} +], +"raml-shapes:range": { +"@id": "#69" +}, +"shacl:minCount": 0, +"shacl:name": "applicationInstanceId" +}, +{ +"@id": "#70", +"@type": [ +"apiContract:Example", +"doc:DomainElement" +], +"core:name": "default-example_1", +"core:displayName": "SimpleSignup", +"core:description": "A simple UserSignup example message", +"doc:strict": true, +"doc:structuredValue": { +"@id": "#71" +}, +"doc:raw": "correlationId: my-correlation-id\napplicationInstanceId: myInstanceId", +"sourcemaps:sources": [ +{ +"@id": "#70/source-map" +} +] +}, +{ +"@id": "#4", +"@type": [ +"security:OAuth2Flow", +"doc:DomainElement" +], +"security:accessTokenUri": "https://example.com/api/oauth/dialog", +"security:flow": "clientCredentials", +"security:scope": [ +{ +"@id": "#5" +} +] +}, +{ +"@id": "#10", +"@type": [ +"apiContract:Example", +"doc:DomainElement" +], +"core:name": "default-example_1", +"core:displayName": "Hello example", +"core:description": "This is the only hello example", +"doc:strict": true, +"doc:structuredValue": { +"@id": "#11" +}, +"doc:raw": "hello Kenobi", +"sourcemaps:sources": [ +{ +"@id": "#10/source-map" +} +] +}, +{ +"@id": "#50", +"@type": [ +"security:OAuth2Flow", +"doc:DomainElement" +], +"security:scope": [ +{ +"@id": "#51" +} +] +}, +{ +"@id": "#18", +"@type": [ +"shacl:PropertyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:path": [ +{ +"@id": "http://a.ml/vocabularies/data#fullName" +} +], +"raml-shapes:range": { +"@id": "#19" +}, +"shacl:minCount": 0, +"shacl:name": "fullName" +}, +{ +"@id": "#20", +"@type": [ +"shacl:PropertyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:path": [ +{ +"@id": "http://a.ml/vocabularies/data#email" +} +], +"raml-shapes:range": { +"@id": "#21" +}, +"shacl:minCount": 0, +"shacl:name": "email" +}, +{ +"@id": "#22", +"@type": [ +"shacl:PropertyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:path": [ +{ +"@id": "http://a.ml/vocabularies/data#age" +} +], +"raml-shapes:range": { +"@id": "#23" +}, +"shacl:minCount": 0, +"shacl:name": "age" +}, +{ +"@id": "#76", +"@type": [ +"apiContract:Example", +"doc:DomainElement" +], +"core:name": "default-example_2", +"core:displayName": "SimpleSignup", +"core:description": "A simple UserSignup example message", +"doc:strict": true, +"doc:structuredValue": { +"@id": "#77" +}, +"doc:raw": "example", +"sourcemaps:sources": [ +{ +"@id": "#76/source-map" +} +] +}, +{ +"@id": "#67", +"@type": [ +"raml-shapes:ScalarShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"shacl:name": "correlationId", +"core:description": "Correlation ID set by application" +}, +{ +"@id": "#69", +"@type": [ +"raml-shapes:ScalarShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"shacl:name": "applicationInstanceId", +"core:description": "Unique identifier for a given instance of the publishing application" +}, +{ +"@id": "#71", +"@type": [ +"data:Object", +"data:Node", +"doc:DomainElement" +], +"data:correlationId": { +"@id": "#72" +}, +"data:applicationInstanceId": { +"@id": "#73" +}, +"core:name": "object_1" +}, +{ +"@id": "#70/source-map", +"@type": [ +"sourcemaps:SourceMap" +], +"sourcemaps:tracked-element": [ +{ +"@id": "#70/source-map/tracked-element/element_0" +} +] +}, +{ +"@id": "#5", +"@type": [ +"security:Scope", +"doc:DomainElement" +], +"core:name": "subscribe:auth_revocations", +"core:description": "Scope required for authorization revocation topic" +}, +{ +"@id": "#11", +"@type": [ +"data:Scalar", +"data:Node", +"doc:DomainElement" +], +"data:value": "hello Kenobi", +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"core:name": "scalar_1" +}, +{ +"@id": "#10/source-map", +"@type": [ +"sourcemaps:SourceMap" +], +"sourcemaps:tracked-element": [ +{ +"@id": "#10/source-map/tracked-element/element_0" +} +] +}, +{ +"@id": "#51", +"@type": [ +"security:Scope", +"doc:DomainElement" +], +"core:name": "subscribe:auth_revocations" +}, +{ +"@id": "#19", +"@type": [ +"raml-shapes:ScalarShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"shacl:name": "fullName" +}, +{ +"@id": "#21", +"@type": [ +"raml-shapes:ScalarShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"raml-shapes:format": "email", +"shacl:name": "email" +}, +{ +"@id": "#23", +"@type": [ +"raml-shapes:ScalarShape", +"raml-shapes:AnyShape", +"shacl:Shape", +"raml-shapes:Shape", +"doc:DomainElement" +], +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#integer" +} +], +"shacl:minInclusive": 18.0, +"shacl:name": "age" +}, +{ +"@id": "#77", +"@type": [ +"data:Scalar", +"data:Node", +"doc:DomainElement" +], +"data:value": "example", +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"core:name": "scalar_1" +}, +{ +"@id": "#76/source-map", +"@type": [ +"sourcemaps:SourceMap" +], +"sourcemaps:tracked-element": [ +{ +"@id": "#76/source-map/tracked-element/element_0" +} +] +}, +{ +"@id": "#72", +"@type": [ +"data:Scalar", +"data:Node", +"doc:DomainElement" +], +"data:value": "my-correlation-id", +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"core:name": "correlationId" +}, +{ +"@id": "#73", +"@type": [ +"data:Scalar", +"data:Node", +"doc:DomainElement" +], +"data:value": "myInstanceId", +"shacl:datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"core:name": "applicationInstanceId" +}, +{ +"@id": "#70/source-map/tracked-element/element_0", +"sourcemaps:element": "amf://id#70", +"sourcemaps:value": "amf://id#60" +}, +{ +"@id": "#10/source-map/tracked-element/element_0", +"sourcemaps:element": "amf://id#10", +"sourcemaps:value": "amf://id#12" +}, +{ +"@id": "#76/source-map/tracked-element/element_0", +"sourcemaps:element": "amf://id#76", +"sourcemaps:value": "amf://id#60" +}, +{ +"@id": "", +"doc:declares": [ +{ +"@id": "#1" +}, +{ +"@id": "#2" +}, +{ +"@id": "#6" +}, +{ +"@id": "#7" +}, +{ +"@id": "#15" +}, +{ +"@id": "#24" +} +], +"@type": [ +"doc:Document", +"doc:Fragment", +"doc:Module", +"doc:Unit" +], +"doc:encodes": { +"@id": "#35" +}, +"doc:root": true, +"doc:processingData": { +"@id": "#34" +} +}, +{ +"@id": "#7", +"@type": [ +"apiContract:Message", +"doc:DomainElement" +], +"core:name": "hello-msg", +"core:description": "This is the description", +"apiContract:payload": [ +{ +"@id": "#13" +} +], +"core:summary": "This is the summary of the hello message", +"apiBinding:binding": { +"@id": "#8" +}, +"apiContract:examples": [ +{ +"@id": "#10" +} +] +}, +{ +"@id": "#15", +"@type": [ +"apiContract:Message", +"doc:DomainElement" +], +"core:name": "user-signup", +"core:description": "This is the description", +"apiContract:payload": [ +{ +"@id": "#16" +} +], +"core:summary": "This is the summary of the anotherOne message" +}, +{ +"@id": "#24", +"@type": [ +"apiContract:EndPoint", +"doc:DomainElement" +], +"apiContract:path": "hello-channel", +"apiContract:supportedOperation": [ +{ +"@id": "#25" +} +] +} +], +"@context": { +"@base": "amf://id", +"shacl": "http://www.w3.org/ns/shacl#", +"raml-shapes": "http://a.ml/vocabularies/shapes#", +"security": "http://a.ml/vocabularies/security#", +"apiBinding": "http://a.ml/vocabularies/apiBinding#", +"data": "http://a.ml/vocabularies/data#", +"doc": "http://a.ml/vocabularies/document#", +"apiContract": "http://a.ml/vocabularies/apiContract#", +"core": "http://a.ml/vocabularies/core#", +"sourcemaps": "http://a.ml/vocabularies/document-source-maps#" +} +} \ No newline at end of file diff --git a/demo/standalone/app.js b/demo/standalone/app.js index 8ff68471e..9b4c3ba38 100644 --- a/demo/standalone/app.js +++ b/demo/standalone/app.js @@ -15,6 +15,8 @@ class ApicApplication extends DemoBase { ['httpbin', 'HTTPbin API'], ['data-type-fragment', 'RAML data type fragment'], ['demo-api', 'Demo API'], + ['jldAsync26', 'Async API 2.6'], + ['asyncApi-2.6', 'Async API 2.6-2'], ['SE-12703', 'OAS allOf body'], ['APIC-262', 'Example value type'], ['console-445', 'Multipart request'], @@ -22,6 +24,8 @@ class ApicApplication extends DemoBase { ['APIC-319', 'APIC-319'], ['multi-server', 'OAS multi server'], ['async-api', 'AsyncAPI'], + ['APIC-560', 'AsyncAPI560'], + ['APIC-570', 'AsyncAPI570'], ]; } diff --git a/package-lock.json b/package-lock.json index ed5437d04..89e8b6dbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "api-console", - "version": "6.6.40", + "version": "6.6.41", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "api-console", - "version": "6.6.40", + "version": "6.6.41", "license": "CPAL-1.0", "dependencies": { "@advanced-rest-client/arc-icons": "^3.2.2", @@ -876,9 +876,9 @@ } }, "node_modules/@api-components/amf-helper-mixin": { - "version": "4.5.24", - "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.5.24.tgz", - "integrity": "sha512-rxjh+9X4OC0pFbYsqXTmiGTr8JM2xkc/oIyGuW9Ez+CKFcF6tb/7xcog5ZC/9CUQHfa5bFrJ5qXH+wjRyMx3hA==", + "version": "4.5.25", + "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.5.25.tgz", + "integrity": "sha512-fudtHuNJkrbWmVMf4sFq45pR6fWGUGLP4l6FwB9CPt7+kGd2iZDGFcT9CpiP4t2b73S8chvrgVtHBXdsDLgbuA==", "dependencies": { "amf-json-ld-lib": "0.0.14" } @@ -920,9 +920,9 @@ } }, "node_modules/@api-components/api-body-document": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/@api-components/api-body-document/-/api-body-document-4.4.8.tgz", - "integrity": "sha512-aV/sddVx3ompzhrvY70c/R+j+15svV5BptXGc/TRP6cCHHioh6oi1+pZ0Hnv7XQr+LgIn8pwwQQ+cSV9y3Xjmw==", + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@api-components/api-body-document/-/api-body-document-4.4.10.tgz", + "integrity": "sha512-3v28PmdMKwCCd39tf9hweydAxER7VQLGlgev3CNiLH2tqjkjqBHAQzr7gGwDhL1hiDbuRw/2Ii66KD/JXdyfJQ==", "dependencies": { "@advanced-rest-client/arc-icons": "^3.3.4", "@advanced-rest-client/arc-marked": "^1.1.2", @@ -1000,9 +1000,9 @@ } }, "node_modules/@api-components/api-endpoint-documentation": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-6.1.0.tgz", - "integrity": "sha512-KOZKtUxJkcXw6rpJpGmfZWbOYJHtS4yvBF5Pd91B1yievB9wOoAI2M7C9fGeNPLNQz7tzPJ9vejLfjY5Suqa8w==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-6.1.2.tgz", + "integrity": "sha512-1bgE8KFpkOjF6xnRbMS/rV9BaVZ1wDTAvaLW3BYvvzwiE6biguC2WemcCTMRdyqyGBpGvDVxiJTa1BRAKyf7Cw==", "dependencies": { "@advanced-rest-client/arc-icons": "^3.3.1", "@advanced-rest-client/arc-marked": "^1.0.6", @@ -1023,9 +1023,9 @@ } }, "node_modules/@api-components/api-example-generator": { - "version": "4.4.28", - "resolved": "https://registry.npmjs.org/@api-components/api-example-generator/-/api-example-generator-4.4.28.tgz", - "integrity": "sha512-51oBt+U9IdKZptSDPS1vI0GTgGCoQ78Hjxdxqgxs1PVGQbkp1217g2rZiH8/sBUsatllYZ5GGMDJcxw+J6uUXA==", + "version": "4.4.29", + "resolved": "https://registry.npmjs.org/@api-components/api-example-generator/-/api-example-generator-4.4.29.tgz", + "integrity": "sha512-56k0eghfeEG9SQGRIIOWFbupkZYi0wC1CcJ8m9VOiC/eZF+ehM2ZvmS1ViAjtR62KgXkacN6hzUo3ICaFzrhdQ==", "dependencies": { "@api-components/amf-helper-mixin": "^4.5.24", "lit-element": "^2.4.0" @@ -1076,9 +1076,9 @@ } }, "node_modules/@api-components/api-headers-document": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@api-components/api-headers-document/-/api-headers-document-4.2.5.tgz", - "integrity": "sha512-jEdSHwydkHaFARD/UBvYJC8mNa3R3YjfZ6rW+mgYi+Tk0gVH98+mFqnT33Mmeo/zk2oXmTwPrFuJASkChlcK1A==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@api-components/api-headers-document/-/api-headers-document-4.2.6.tgz", + "integrity": "sha512-gn/I2vxpQ2FpaC7xkpoZNsY3wSqoucK2gdDoJb8x/ua9EElyvirSe3hIX5tOQenJgBmXa+h/i6oyAUkzrCnekA==", "dependencies": { "@advanced-rest-client/arc-icons": "^3.3.4", "@anypoint-web-components/anypoint-button": "^1.2.3", @@ -1088,9 +1088,9 @@ } }, "node_modules/@api-components/api-method-documentation": { - "version": "5.2.15", - "resolved": "https://registry.npmjs.org/@api-components/api-method-documentation/-/api-method-documentation-5.2.15.tgz", - "integrity": "sha512-v5QXffbZHnwIYZYnHyA9tM3HGRhjdx2ArfyTVsgTQ+BkFDeAXLc8xdPGNlIQbedbJQ7lGFANzLX0jjyosxaT7w==", + "version": "5.2.25", + "resolved": "https://registry.npmjs.org/@api-components/api-method-documentation/-/api-method-documentation-5.2.25.tgz", + "integrity": "sha512-wWtAJ1eUzIgN4vq4Owo6YCPxfUV4GD8XMRIWHJJlFeJgAzmb/JZnSqsvDDE+bKDaVT/IG1UsYlbH9XB0ufvdHg==", "dependencies": { "@advanced-rest-client/arc-icons": "^3.3.4", "@advanced-rest-client/arc-marked": "^1.1.1", @@ -1263,9 +1263,9 @@ } }, "node_modules/@api-components/api-schema-document": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@api-components/api-schema-document/-/api-schema-document-4.3.6.tgz", - "integrity": "sha512-yhMR+/MBD67YONoN+NQfXvh+HUeN1uDigxUHronT1mnogWyGIBI6yeyWp2d+nZHWXsWsTpKyD3EFWg0caaMnxg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/@api-components/api-schema-document/-/api-schema-document-4.3.7.tgz", + "integrity": "sha512-douAeBNPIU/TkscIzvx/J3moEnQN331pdFus71Hc9ZFJIruatdprLTniDNXpCVw6igDAIHxrZDR66XxpwpehPA==", "dependencies": { "@advanced-rest-client/arc-types": "^0.2.61", "@advanced-rest-client/clipboard-copy": "^3.1.1", @@ -1309,13 +1309,13 @@ } }, "node_modules/@api-components/api-summary": { - "version": "4.6.5", - "resolved": "https://registry.npmjs.org/@api-components/api-summary/-/api-summary-4.6.5.tgz", - "integrity": "sha512-c7vNgiRqjhR+f4yaDUb4I0sthnOrl9yj1CnUta/6O/4GV4YCKlZMqU2trKxFGYY489XBuBLSy2euMahvAL6ZHQ==", + "version": "4.6.9", + "resolved": "https://registry.npmjs.org/@api-components/api-summary/-/api-summary-4.6.9.tgz", + "integrity": "sha512-aRAxq+YD0bXOAbrqChrXvcxI0yFmYHjsVgP1Jv/luq41HEr+UQOzNYQxnnhf99AKy1Kulx5TJEMPVnaI4omzKw==", "dependencies": { "@advanced-rest-client/arc-marked": "^1.1.2", "@advanced-rest-client/markdown-styles": "^3.1.5", - "@api-components/amf-helper-mixin": "^4.5.14", + "@api-components/amf-helper-mixin": "4.5.25", "@api-components/api-method-documentation": "^5.2.5", "@api-components/http-method-label": "^3.1.4", "@api-components/raml-aware": "^3.0.0", @@ -24507,9 +24507,9 @@ } }, "@api-components/amf-helper-mixin": { - "version": "4.5.24", - "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.5.24.tgz", - "integrity": "sha512-rxjh+9X4OC0pFbYsqXTmiGTr8JM2xkc/oIyGuW9Ez+CKFcF6tb/7xcog5ZC/9CUQHfa5bFrJ5qXH+wjRyMx3hA==", + "version": "4.5.25", + "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.5.25.tgz", + "integrity": "sha512-fudtHuNJkrbWmVMf4sFq45pR6fWGUGLP4l6FwB9CPt7+kGd2iZDGFcT9CpiP4t2b73S8chvrgVtHBXdsDLgbuA==", "requires": { "amf-json-ld-lib": "0.0.14" } @@ -24547,9 +24547,9 @@ } }, "@api-components/api-body-document": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/@api-components/api-body-document/-/api-body-document-4.4.8.tgz", - "integrity": "sha512-aV/sddVx3ompzhrvY70c/R+j+15svV5BptXGc/TRP6cCHHioh6oi1+pZ0Hnv7XQr+LgIn8pwwQQ+cSV9y3Xjmw==", + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@api-components/api-body-document/-/api-body-document-4.4.10.tgz", + "integrity": "sha512-3v28PmdMKwCCd39tf9hweydAxER7VQLGlgev3CNiLH2tqjkjqBHAQzr7gGwDhL1hiDbuRw/2Ii66KD/JXdyfJQ==", "requires": { "@advanced-rest-client/arc-icons": "^3.3.4", "@advanced-rest-client/arc-marked": "^1.1.2", @@ -24627,9 +24627,9 @@ } }, "@api-components/api-endpoint-documentation": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-6.1.0.tgz", - "integrity": "sha512-KOZKtUxJkcXw6rpJpGmfZWbOYJHtS4yvBF5Pd91B1yievB9wOoAI2M7C9fGeNPLNQz7tzPJ9vejLfjY5Suqa8w==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-6.1.2.tgz", + "integrity": "sha512-1bgE8KFpkOjF6xnRbMS/rV9BaVZ1wDTAvaLW3BYvvzwiE6biguC2WemcCTMRdyqyGBpGvDVxiJTa1BRAKyf7Cw==", "requires": { "@advanced-rest-client/arc-icons": "^3.3.1", "@advanced-rest-client/arc-marked": "^1.0.6", @@ -24650,9 +24650,9 @@ } }, "@api-components/api-example-generator": { - "version": "4.4.28", - "resolved": "https://registry.npmjs.org/@api-components/api-example-generator/-/api-example-generator-4.4.28.tgz", - "integrity": "sha512-51oBt+U9IdKZptSDPS1vI0GTgGCoQ78Hjxdxqgxs1PVGQbkp1217g2rZiH8/sBUsatllYZ5GGMDJcxw+J6uUXA==", + "version": "4.4.29", + "resolved": "https://registry.npmjs.org/@api-components/api-example-generator/-/api-example-generator-4.4.29.tgz", + "integrity": "sha512-56k0eghfeEG9SQGRIIOWFbupkZYi0wC1CcJ8m9VOiC/eZF+ehM2ZvmS1ViAjtR62KgXkacN6hzUo3ICaFzrhdQ==", "requires": { "@api-components/amf-helper-mixin": "^4.5.24", "lit-element": "^2.4.0" @@ -24703,9 +24703,9 @@ } }, "@api-components/api-headers-document": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@api-components/api-headers-document/-/api-headers-document-4.2.5.tgz", - "integrity": "sha512-jEdSHwydkHaFARD/UBvYJC8mNa3R3YjfZ6rW+mgYi+Tk0gVH98+mFqnT33Mmeo/zk2oXmTwPrFuJASkChlcK1A==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@api-components/api-headers-document/-/api-headers-document-4.2.6.tgz", + "integrity": "sha512-gn/I2vxpQ2FpaC7xkpoZNsY3wSqoucK2gdDoJb8x/ua9EElyvirSe3hIX5tOQenJgBmXa+h/i6oyAUkzrCnekA==", "requires": { "@advanced-rest-client/arc-icons": "^3.3.4", "@anypoint-web-components/anypoint-button": "^1.2.3", @@ -24715,9 +24715,9 @@ } }, "@api-components/api-method-documentation": { - "version": "5.2.15", - "resolved": "https://registry.npmjs.org/@api-components/api-method-documentation/-/api-method-documentation-5.2.15.tgz", - "integrity": "sha512-v5QXffbZHnwIYZYnHyA9tM3HGRhjdx2ArfyTVsgTQ+BkFDeAXLc8xdPGNlIQbedbJQ7lGFANzLX0jjyosxaT7w==", + "version": "5.2.25", + "resolved": "https://registry.npmjs.org/@api-components/api-method-documentation/-/api-method-documentation-5.2.25.tgz", + "integrity": "sha512-wWtAJ1eUzIgN4vq4Owo6YCPxfUV4GD8XMRIWHJJlFeJgAzmb/JZnSqsvDDE+bKDaVT/IG1UsYlbH9XB0ufvdHg==", "requires": { "@advanced-rest-client/arc-icons": "^3.3.4", "@advanced-rest-client/arc-marked": "^1.1.1", @@ -24883,9 +24883,9 @@ } }, "@api-components/api-schema-document": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@api-components/api-schema-document/-/api-schema-document-4.3.6.tgz", - "integrity": "sha512-yhMR+/MBD67YONoN+NQfXvh+HUeN1uDigxUHronT1mnogWyGIBI6yeyWp2d+nZHWXsWsTpKyD3EFWg0caaMnxg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/@api-components/api-schema-document/-/api-schema-document-4.3.7.tgz", + "integrity": "sha512-douAeBNPIU/TkscIzvx/J3moEnQN331pdFus71Hc9ZFJIruatdprLTniDNXpCVw6igDAIHxrZDR66XxpwpehPA==", "requires": { "@advanced-rest-client/arc-types": "^0.2.61", "@advanced-rest-client/clipboard-copy": "^3.1.1", @@ -24929,13 +24929,13 @@ } }, "@api-components/api-summary": { - "version": "4.6.5", - "resolved": "https://registry.npmjs.org/@api-components/api-summary/-/api-summary-4.6.5.tgz", - "integrity": "sha512-c7vNgiRqjhR+f4yaDUb4I0sthnOrl9yj1CnUta/6O/4GV4YCKlZMqU2trKxFGYY489XBuBLSy2euMahvAL6ZHQ==", + "version": "4.6.9", + "resolved": "https://registry.npmjs.org/@api-components/api-summary/-/api-summary-4.6.9.tgz", + "integrity": "sha512-aRAxq+YD0bXOAbrqChrXvcxI0yFmYHjsVgP1Jv/luq41HEr+UQOzNYQxnnhf99AKy1Kulx5TJEMPVnaI4omzKw==", "requires": { "@advanced-rest-client/arc-marked": "^1.1.2", "@advanced-rest-client/markdown-styles": "^3.1.5", - "@api-components/amf-helper-mixin": "^4.5.14", + "@api-components/amf-helper-mixin": "4.5.25", "@api-components/api-method-documentation": "^5.2.5", "@api-components/http-method-label": "^3.1.4", "@api-components/raml-aware": "^3.0.0", diff --git a/package.json b/package.json index 8cea9e6c9..e4774b4d3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "api-console", "description": "The API Console to automatically generate API documentation from RAML and OAS files.", - "version": "6.6.40", + "version": "6.6.41", "license": "CPAL-1.0", "main": "index.js", "module": "index.js", diff --git a/test/api-console-documentation.test.js b/test/api-console-documentation.test.js index 3be39d4b4..6e1bd25e3 100644 --- a/test/api-console-documentation.test.js +++ b/test/api-console-documentation.test.js @@ -140,7 +140,7 @@ describe('API Console documentation', () => { await waitUntil(() => Boolean(documentationSummary(element))); const summaryShadowRoot = documentationSummary(element).shadowRoot; await waitUntil(() => Boolean(summaryShadowRoot.querySelector('.api-title'))); - assert.equal(summaryShadowRoot.querySelector('.api-title').textContent.trim(), 'API title:\n Google Drive'); + assert.equal(summaryShadowRoot.querySelector('.api-title span').textContent.trim(), 'Google Drive'); await waitUntil(() => Boolean(summaryShadowRoot.querySelector('.inline-description.version'))); assert.equal(summaryShadowRoot.querySelector('.inline-description.version').textContent.trim(), 'Version:\n v2'); @@ -833,8 +833,8 @@ describe('API Console documentation', () => { it('should render URL', async () => { await waitUntil(() => Boolean(docShadowRoot.querySelector('api-url'))); const apiUrl = docShadowRoot.querySelector('api-url').shadowRoot; - assert.equal(apiUrl.querySelector('.url-channel-value').innerText.trim(), 'Channel\nsmartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured'); - assert.equal(apiUrl.querySelector('.url-server-value').innerText.trim(), 'Server\nmqtt://api.streetlights.smartylighting.com:{port}'); + assert.equal(apiUrl.querySelector('.url-channel-value').innerText.trim(), 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured'); + assert.equal(apiUrl.querySelector('.async-server-name').innerText.trim(), 'production'); }); it('should render description', async () => { @@ -865,8 +865,8 @@ describe('API Console documentation', () => { it('should render URL', async () => { await waitUntil(() => Boolean(docShadowRoot.querySelector('api-url'))); const apiUrl = docShadowRoot.querySelector('api-url').shadowRoot; - assert.equal(apiUrl.querySelector('.url-channel-value').innerText.trim(), 'Channelsmartylighting/streetlights/1/0/action/{streetlightId}/turn/on'); - assert.equal(apiUrl.querySelector('.url-server-value').innerText.trim(), 'Servermqtt://api.streetlights.smartylighting.com:{port}'); + assert.equal(apiUrl.querySelector('.url-channel-value').innerText.trim(), 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on'); + assert.equal(apiUrl.querySelector('.async-server-name').innerText.trim(), 'production'); }); it('should render methods', async () => { diff --git a/test/api-console.amf.test.js b/test/api-console.amf.test.js index 05517421a..a83592bb7 100644 --- a/test/api-console.amf.test.js +++ b/test/api-console.amf.test.js @@ -391,11 +391,11 @@ describe('ApiConsole', () => { await aTimeout(0); }); - it('should not prefix URL with `http://', () => { + it('should render server name', () => { const documentation = element.shadowRoot.querySelector('api-documentation'); const summary = documentation.shadowRoot.querySelector('api-summary'); - const apiUrl = summary.shadowRoot.querySelector('api-url'); - assert.isFalse(apiUrl.url.startsWith('http') || apiUrl.url.startsWith('https')); + const serverName = summary.shadowRoot.querySelector('.server-name'); + assert.equal(serverName.textContent, 'production'); }); }); }); @@ -490,7 +490,7 @@ describe('ApiConsole', () => { const methodDocumentation = documentation.shadowRoot.querySelector('api-method-documentation'); const apiUrl = methodDocumentation.shadowRoot.querySelector('api-url'); assert.exists(apiUrl.shadowRoot.querySelector('.url-channel-value')); - assert.exists(apiUrl.shadowRoot.querySelector('.url-server-value')); + assert.exists(apiUrl.shadowRoot.querySelector('.async-server-name')); }); }); });