diff --git a/.github/workflows/publish-gh-pages.yml b/.github/workflows/publish-gh-pages.yml
new file mode 100644
index 00000000..1494e1b2
--- /dev/null
+++ b/.github/workflows/publish-gh-pages.yml
@@ -0,0 +1,28 @@
+name: Publish Github Pages
+
+on:
+ push:
+ branches:
+ - add_tck_tests
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ - name: Build tck runner reports
+ run: make
+ working-directory: ./runner
+ - name: Create .nojekyll file
+ run: touch runner/reports/html/.nojekyll
+ - name: Install SSH Client
+ uses: webfactory/ssh-agent@v0.2.0
+ with:
+ ssh-private-key: ${{ secrets.DEPLOY_KEY }}
+ - name: Deploy to Github Pages
+ uses: JamesIves/github-pages-deploy-action@releases/v3
+ with:
+ SSH: true
+ BRANCH: gh-pages # The branch the action should deploy to.
+ FOLDER: runner/reports/html/ # The folder the action should deploy.
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..3c3629e6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+node_modules
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..4bba944e
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,18 @@
+# Contributing
+
+Each test case should contain the following files:
+* A valid `*valid*.yaml` file showcasing valid use of the feature under test
+* An invalid `*invalid*.yaml` files showcasing invalid use of the feature under test
+
+Please place new tests in one of `tests/asyncapi-2.0` sub-folders. Name of the target folder should correspond to the name of the feature your tests test. E.g. if your new `.yaml` tests `Info Object`, place it in `tests/asyncapi-2.0/Info Object`.
+
+Non-AsyncAPI files (libraries, extensions, etc.) must have a `.yml` extension instead of `.yaml`.
+
+After adding/moving/deleting tck files, manifest has to be regenerated with:
+```sh
+npm run gen-manifest
+```
+
+## Running tests
+
+We've created a separate project called [tck runner](./runner) to run all the tests contained in the AsyncAPI TCK. By following the instructions on that directory, you should be able to test any new test case that you may want to contribute against the different projects that this runner covers.
diff --git a/README.md b/README.md
index f738dc77..82d2db46 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,18 @@
-# tck
+# AsyncAPI tck
+
+AsyncAPI's Test Compatibility Kit (AsyncAPI TCK) provides a way for any AsyncAPI processor to test its compliance with the AsyncAPI 2.0 Spec. AsyncAPI TCK contains a set of AsyncAPI documents meant to be used to test correct and incorrect usage of each AsyncAPI feature.
+
+## Naming convention
+
+- `*valid*.yaml`: valid AsyncAPI file expected to be successfully processed
+- `*invalid*.yaml`: invalid AsyncAPI file with syntax/semantic/spec error(s), expected to be unsuccessfully processed (error or exit code returned)
+
+Note that this repository contains a [manifest file](./manifest.json) that lists all tests in the order their respective tested features appear in the AsyncAPI 2.0 Specification.
+
+Names of folders' tests reside in correspond to AsyncAPI 2.0 Specification sections names.
+
+Non-AsyncAPI files (libraries, extensions, etc.) must have a `.yml` extension instead of `.yaml`.
+
+## Contributing
+
+We welcome contributions! If you have a new test case in mind, feel free to submit a pull request. More info on how to do that [here](./CONTRIBUTING.md).
diff --git a/genmanifest.js b/genmanifest.js
new file mode 100644
index 00000000..5a8d6f68
--- /dev/null
+++ b/genmanifest.js
@@ -0,0 +1,155 @@
+const path = require('path')
+const fs = require('fs')
+const walk = require('walk')
+
+// Features listed in order they appear in the spec spec.
+const FEATURES_PRIORITY = [
+ 'Format',
+ 'File Structure',
+ 'AsyncAPI Object',
+ 'AsyncAPI Version String',
+ 'Identifier',
+ 'Info Object',
+ 'Contact Object',
+ 'License Object',
+ 'Servers Object',
+ 'Server Object',
+ 'Server Variable Object',
+ 'Channels Object',
+ 'Channel Item Object',
+ 'Operation Object',
+ 'Operation Trait Object',
+ 'Message Object',
+ 'Message Trait Object',
+ 'Tags Object',
+ 'Tag Object',
+ 'External Documentation Object',
+ 'Components Object',
+ 'Reference Object',
+ 'Schema Object',
+ 'Security Scheme Object',
+ 'Security Requirement Object',
+ 'Parameters Object',
+ 'Parameter Object',
+ 'Server Bindings Object',
+ 'Channel Bindings Object',
+ 'Operation Bindings Object',
+ 'Message Bindings Object',
+ 'Correlation ID Object',
+ 'Specification Extensions'
+]
+
+const EXT = '.yaml'
+
+function main () {
+ const projRoot = path.resolve(__dirname)
+ const inputRoot = getInputDirPath()
+ let filesPaths = listFiles(inputRoot)
+ filesPaths = sortFilesPaths(inputRoot, filesPaths)
+ filesPaths = makePathsRelative(projRoot, filesPaths)
+ generateManifest(projRoot, filesPaths)
+}
+
+// Gets absolute path of input folder
+function getInputDirPath () {
+ let dirPath = process.argv[2]
+
+ if (!fs.existsSync(dirPath)) {
+ console.error(`'${dirPath}' not found`)
+ return
+ }
+
+ dirPath = path.resolve(dirPath)
+ if (!fs.lstatSync(dirPath).isDirectory()) {
+ console.error(`'${dirPath}' is not a directory`)
+ return
+ }
+ return dirPath
+}
+
+// Lists files with a particular extension under directory path
+function listFiles (dirPath) {
+ let files = []
+ const options = {
+ listeners: {
+ file: (root, fileStats, next) => {
+ if (fileStats.name.indexOf(EXT) >= 0) {
+ files.push(path.join(root, fileStats.name))
+ }
+ next()
+ }
+ }
+ }
+ walk.walkSync(dirPath, options)
+ return files
+}
+
+// Sorts string filesPaths according to features definition order in a spec
+function sortFilesPaths (filesRoot, filesPaths) {
+ const pathObjs = extendWithPriority(
+ filesRoot, filesPaths, FEATURES_PRIORITY.slice())
+ const sortedPathObjs = pathObjs.sort((obj1, obj2) => {
+ return obj1.priority - obj2.priority
+ })
+ return sortedPathObjs.map((obj) => {
+ return obj.path
+ })
+}
+
+// Makes fiels paths relative to a directory
+function makePathsRelative (dirPath, filesPaths) {
+ return filesPaths.map((pth) => {
+ return path.relative(dirPath, pth)
+ })
+}
+
+// Turns plain file paths into objects of type {priority: INT, path: STRING}
+// E.g.:
+// > let featuresPriority = ['methodresponses', 'overlays']
+// > extendWithPriority('/foo/bar', '/foo/bar/Overlays/some/file.ext')
+// > {priority: 2, path: '/foo/bar/Overlays/some/file.ext'}
+// > extendWithPriority('/foo/bar', '/foo/bar/qweqwe/some/file.ext')
+// > {priority: 3, path: '/foo/bar/qweqwe/some/file.ext'}
+//
+// Override this to change logic of picking priority.
+function extendWithPriority (filesRoot, filesPaths, featuresPriority) {
+ featuresPriority = featuresPriority.map(x => x.toLowerCase())
+ return filesPaths.map((pth) => {
+ const piece = getFirstPathPiece(filesRoot, pth).toLowerCase()
+ let priority = featuresPriority.findIndex(el => el === piece)
+
+ // Feature name not found. Adding it to the list allows sorting not
+ // found features.
+ if (priority === -1) {
+ featuresPriority.push(piece)
+ priority = featuresPriority.length - 1
+ }
+ priority += 1 // Make 1-based
+ return {path: pth, priority: priority}
+ })
+}
+
+// Gets relative folder 'root' name of files file path.
+// E.g.:
+// > const filesRoot = '/foo/bar'
+// > const fielPath = '/foo/bar/MethodResponses/some/file.ext'
+// > getFirstPathPiece(filesRoot, fielPath)
+// > 'methodresponses'
+function getFirstPathPiece (filesRoot, fielPath) {
+ const relPath = path.relative(filesRoot, fielPath)
+ return relPath.split(path.sep)[0].toLowerCase()
+}
+
+// Generates and writes manifest file
+function generateManifest (dirPath, filesPaths) {
+ const data = {
+ description: 'Files listed in order corresponding AsyncAPI ' +
+ 'feature appears in AsyncAPI 2.0 Specification',
+ filePaths: filesPaths
+ }
+ const manifestPath = path.join(dirPath, 'manifest.json')
+ console.log(`Writing manifest file to ${manifestPath}`)
+ fs.writeFileSync(manifestPath, JSON.stringify(data, null, 4))
+}
+
+main()
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 00000000..27df0e87
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,384 @@
+{
+ "description": "Files listed in order corresponding AsyncAPI feature appears in AsyncAPI 2.0 Specification",
+ "filePaths": [
+ "tests/asyncapi-2.0/Format/invalid-case-sensitive.yaml",
+ "tests/asyncapi-2.0/Format/invalid-json-schema-tag.yaml",
+ "tests/asyncapi-2.0/Format/invalid-key.yaml",
+ "tests/asyncapi-2.0/Format/invalid-syntax.yaml",
+ "tests/asyncapi-2.0/Format/valid.yaml",
+ "tests/asyncapi-2.0/File Structure/invalid-inexisting-file-ref.yaml",
+ "tests/asyncapi-2.0/File Structure/valid.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/invalid-duplicate-tags.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-asyncapi.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-channels.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-info.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/valid.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-asyncapi-type.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-channels-type.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-components-type.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-externalDocs-type.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-id-type.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-info-type.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-servers-type.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-tags-type.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Version String/invalid-missing-patch.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Version String/invalid-version-string-format.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Version String/valid-major-minor-patch.yaml",
+ "tests/asyncapi-2.0/AsyncAPI Version String/valid-with-hyphen.yaml",
+ "tests/asyncapi-2.0/Identifier/invalid-uri-format.yaml",
+ "tests/asyncapi-2.0/Identifier/valid-uri.yaml",
+ "tests/asyncapi-2.0/Identifier/valid-urn.yaml",
+ "tests/asyncapi-2.0/Info Object/invalid-missing-title.yaml",
+ "tests/asyncapi-2.0/Info Object/invalid-missing-version.yaml",
+ "tests/asyncapi-2.0/Info Object/invalid-termsofservice-url-format.yaml",
+ "tests/asyncapi-2.0/Info Object/valid.yaml",
+ "tests/asyncapi-2.0/Info Object/Fields Types/invalid-contact-type.yaml",
+ "tests/asyncapi-2.0/Info Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Info Object/Fields Types/invalid-license-type.yaml",
+ "tests/asyncapi-2.0/Info Object/Fields Types/invalid-termsOfService-type.yaml",
+ "tests/asyncapi-2.0/Info Object/Fields Types/invalid-title-type.yaml",
+ "tests/asyncapi-2.0/Info Object/Fields Types/invalid-version-type.yaml",
+ "tests/asyncapi-2.0/Contact Object/invalid-email-format.yaml",
+ "tests/asyncapi-2.0/Contact Object/invalid-url-format.yaml",
+ "tests/asyncapi-2.0/Contact Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Contact Object/valid.yaml",
+ "tests/asyncapi-2.0/Contact Object/Fields Types/invalid-email-type.yaml",
+ "tests/asyncapi-2.0/Contact Object/Fields Types/invalid-name-type.yaml",
+ "tests/asyncapi-2.0/Contact Object/Fields Types/invalid-url-type.yaml",
+ "tests/asyncapi-2.0/License Object/invalid-missing-name.yaml",
+ "tests/asyncapi-2.0/License Object/invalid-url-format.yaml",
+ "tests/asyncapi-2.0/License Object/valid.yaml",
+ "tests/asyncapi-2.0/License Object/Fields Types/invalid-name-type.yaml",
+ "tests/asyncapi-2.0/License Object/Fields Types/invalid-url-type.yaml",
+ "tests/asyncapi-2.0/Servers Object/invalid-patterned-field.yaml",
+ "tests/asyncapi-2.0/Servers Object/valid.yaml",
+ "tests/asyncapi-2.0/Server Object/invalid-inexisting-security-scheme.yaml",
+ "tests/asyncapi-2.0/Server Object/invalid-missing-protocol.yaml",
+ "tests/asyncapi-2.0/Server Object/invalid-missing-url.yaml",
+ "tests/asyncapi-2.0/Server Object/valid-multiple-servers.yaml",
+ "tests/asyncapi-2.0/Server Object/valid-not-official-protocol.yaml",
+ "tests/asyncapi-2.0/Server Object/valid-relative-url.yaml",
+ "tests/asyncapi-2.0/Server Object/valid-security.yaml",
+ "tests/asyncapi-2.0/Server Object/valid.yaml",
+ "tests/asyncapi-2.0/Server Object/Fields Types/invalid-bindings-type.yaml",
+ "tests/asyncapi-2.0/Server Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Server Object/Fields Types/invalid-protocol-type.yaml",
+ "tests/asyncapi-2.0/Server Object/Fields Types/invalid-protocolVersion-type.yaml",
+ "tests/asyncapi-2.0/Server Object/Fields Types/invalid-security-type.yaml",
+ "tests/asyncapi-2.0/Server Object/Fields Types/invalid-url-type.yaml",
+ "tests/asyncapi-2.0/Server Object/Fields Types/invalid-variables-type.yaml",
+ "tests/asyncapi-2.0/Server Variable Object/invalid-examples-item.yaml",
+ "tests/asyncapi-2.0/Server Variable Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Server Variable Object/valid-extra-variable.yaml",
+ "tests/asyncapi-2.0/Server Variable Object/valid-variable-not-defined.yaml",
+ "tests/asyncapi-2.0/Server Variable Object/valid.yaml",
+ "tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-default-type.yaml",
+ "tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-enum-type.yaml",
+ "tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-examples-type.yaml",
+ "tests/asyncapi-2.0/Channels Object/invalid-query-param-used.yaml",
+ "tests/asyncapi-2.0/Channels Object/valid.yaml",
+ "tests/asyncapi-2.0/Channels Object/Fields Types/invalid-channel-type.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/invalid-external-ref-structure.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/valid-external-ref.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/valid-publish.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/valid-subscribe.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-bindings-type.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-parameters-type.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-publish-type.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-ref-type.yaml",
+ "tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-subscribe-type.yaml",
+ "tests/asyncapi-2.0/Operation Object/invalid-duplicate-operationId.yaml",
+ "tests/asyncapi-2.0/Operation Object/invalid-duplicate-tags.yaml",
+ "tests/asyncapi-2.0/Operation Object/valid-bare-minimum.yaml",
+ "tests/asyncapi-2.0/Operation Object/valid-case-sensitive-operationId.yaml",
+ "tests/asyncapi-2.0/Operation Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Operation Object/valid-multiple-messages.yaml",
+ "tests/asyncapi-2.0/Operation Object/valid.yaml",
+ "tests/asyncapi-2.0/Operation Object/Fields Types/invalid-bindings-type.yaml",
+ "tests/asyncapi-2.0/Operation Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Operation Object/Fields Types/invalid-externalDocs-type.yaml",
+ "tests/asyncapi-2.0/Operation Object/Fields Types/invalid-message-type.yaml",
+ "tests/asyncapi-2.0/Operation Object/Fields Types/invalid-operationId-type.yaml",
+ "tests/asyncapi-2.0/Operation Object/Fields Types/invalid-summary-type.yaml",
+ "tests/asyncapi-2.0/Operation Object/Fields Types/invalid-tags-type.yaml",
+ "tests/asyncapi-2.0/Operation Object/Fields Types/invalid-traits-type.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/invalid-duplicate-operationId.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/invalid-duplicate-tags.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/invalid-trait-with-message.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/invalid-trait-with-traits.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/valid-case-sensetive-operationId.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/valid-empty-trait.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/valid.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-bindings-type.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-externalDocs-type.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-operationId-type.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-summary-type.yaml",
+ "tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-tags-type.yaml",
+ "tests/asyncapi-2.0/Message Object/invalid-duplicate-tags.yaml",
+ "tests/asyncapi-2.0/Message Object/invalid-examples-item.yaml",
+ "tests/asyncapi-2.0/Message Object/invalid-headers-type.yaml",
+ "tests/asyncapi-2.0/Message Object/invalid-missing-contentType.yaml",
+ "tests/asyncapi-2.0/Message Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Message Object/valid-internal-ref-correlationId.yaml",
+ "tests/asyncapi-2.0/Message Object/valid-internal-ref-header.yaml",
+ "tests/asyncapi-2.0/Message Object/valid-using-defaultContentType.yaml",
+ "tests/asyncapi-2.0/Message Object/valid.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-bindings-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-contentType-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-correlationId-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-examples-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-externalDocs-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-headers-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-name-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-schemaFormat-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-summary-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-tags-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-title-type.yaml",
+ "tests/asyncapi-2.0/Message Object/Fields Types/invalid-traits-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/invalid-defines-payload.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/invalid-defines-traits.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/invalid-duplicate-tags.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/invalid-examples-item.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/invalid-headers-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/invalid-missing-content-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/valid-internal-ref-correlationId.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/valid-internal-ref-header.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/valid-using-defaultContentType.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/valid.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-bindings-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-contentType-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-correlationId-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-examples-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-externalDocs-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-headers-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-schemaFormat-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-summary-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-tags-type.yaml",
+ "tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-title-type.yaml",
+ "tests/asyncapi-2.0/Tag Object/invalid-missing-name.yaml",
+ "tests/asyncapi-2.0/Tag Object/valid.yaml",
+ "tests/asyncapi-2.0/Tag Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Tag Object/Fields Types/invalid-externalDocs-type.yaml",
+ "tests/asyncapi-2.0/Tag Object/Fields Types/invalid-name-type.yaml",
+ "tests/asyncapi-2.0/External Documentation Object/invalid-missing-url.yaml",
+ "tests/asyncapi-2.0/External Documentation Object/invalid-url-format.yaml",
+ "tests/asyncapi-2.0/External Documentation Object/valid.yaml",
+ "tests/asyncapi-2.0/External Documentation Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/External Documentation Object/Fields Types/invalid-url-type.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-channelBindings-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-correlationIds-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-messageBindings-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-messageTraits-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-messages-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-operationBindings-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-operationTraits-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-parameters-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-schemas-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-securitySchemes-key.yaml",
+ "tests/asyncapi-2.0/Components Object/invalid-serverBindings-key.yaml",
+ "tests/asyncapi-2.0/Components Object/valid-complete.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-channelBindings-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-correlationIds-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-messageBindings-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-messageTraits-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-messages-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-operationBindings-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-operationTraits-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-parameters-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-schemas-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-securitySchemes-type.yaml",
+ "tests/asyncapi-2.0/Components Object/Fields Types/invalid-serverBindings-type.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-channelBindings.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-correlationId.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-message.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-messageBindings.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-messageTraits.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-operationBindings.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-operationTraits.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-parameter.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-schema.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-securityScheme.yaml",
+ "tests/asyncapi-2.0/Reference Object/valid-external-ref-serverBindings.yaml",
+ "tests/asyncapi-2.0/Reference Object/Fields Types/invalid-ref-type.yaml",
+ "tests/asyncapi-2.0/Schema Object/invalid-polymorphism-missing-discriminator.yaml",
+ "tests/asyncapi-2.0/Schema Object/valid-composition.yaml",
+ "tests/asyncapi-2.0/Schema Object/valid-polymorphism.yaml",
+ "tests/asyncapi-2.0/Schema Object/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/userPassword/invalid-missing-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/userPassword/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/symmetricEncryption/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/openIdConnect/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-authorizationUrl-format.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-authorizationCode-authrozationUrl.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-authorizationCode-tokenUrl.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-clientCredentials-tokenUrl.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-flows.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-implicit-authorizationUrl.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-scopes.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-password-missing-tokenUrl.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-refreshUrl-format.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-tokenUrl-format.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/valid-empty-flows.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-authorizationCode-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-authorizationUrl-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-clientCredentials-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-implicit-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-password-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-refreshUrl-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-scopes-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-tokenUrl-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-in-value.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-missing-in-property.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-missing-name.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/httpApiKey/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/http/invalid-missing-scheme.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/http/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/asymmetricEncryption/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/apiKey/invalid-in-value.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/apiKey/invalid-missing-in-property.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/apiKey/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/X509/valid.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-bearerFormat-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-flows-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-in-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-name-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-openIdConnectUrl-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-scheme-type.yaml",
+ "tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-type-type.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-X509-non-empty-array.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-apiKey-non-empty-array.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-asymmetricEncryption-non-empty-array.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-http-non-empty-array.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-httpApiKey-non-empty-array.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-inexisting-scheme.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-oauth2-without-scopes.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-openIdConnect-without-scopes.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-symmetricEncryption-non-empty-array.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/invalid-userPassword-non-empty-array.yaml",
+ "tests/asyncapi-2.0/Security Requirement Object/Fields Types/invalid-name-type.yaml",
+ "tests/asyncapi-2.0/Parameters Object/invalid-pattern-field.yaml",
+ "tests/asyncapi-2.0/Parameters Object/valid-internal-ref.yaml",
+ "tests/asyncapi-2.0/Parameters Object/valid.yaml",
+ "tests/asyncapi-2.0/Parameters Object/Fields Types/invalid-parameter-type.yaml",
+ "tests/asyncapi-2.0/Parameter Object/invalid-runtime-expression.yaml",
+ "tests/asyncapi-2.0/Parameter Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Parameter Object/valid-extra-parameter.yaml",
+ "tests/asyncapi-2.0/Parameter Object/valid-parameter-not-defined.yaml",
+ "tests/asyncapi-2.0/Parameter Object/valid-ref-schema.yaml",
+ "tests/asyncapi-2.0/Parameter Object/valid.yaml",
+ "tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-location-type.yaml",
+ "tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-schema-type.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/invalid-extra-properties.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/valid.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-cleanSession-type.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-clientId-type.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-keepAlive-type.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-message-type.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-qos-type.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-retain-type.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-topic-type.yaml",
+ "tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-extra-properties.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-headers-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-method.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-query-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/ws/valid.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-headers-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-method-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-query-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-exchange-name-length.yaml.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-exchange-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-is-value.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-queue-name-length.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/valid.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-autoDelete-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-durable-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-name-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-type-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-vhost-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-is-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-autoDelete-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-durable-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-exclusive-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-name-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-type.yaml",
+ "tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-vhost-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/mqtt/invalid-extra-properties.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/mqtt/invalid-qos-value.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/mqtt/valid.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-qos-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-retain-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/kafka/invalid-extra-properties.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/kafka/valid.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-clientId-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-groupId-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/http/invalid-method-value.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/http/invalid-missing-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/http/invalid-query-schema-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/http/invalid-type-value.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/http/valid.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-method-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-query-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-type-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-deliveryMode-value.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-expiration-below-zero.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-extra-properties.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/valid.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-ack-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-bcc-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-cc-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-deliveryMode-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-expiration-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-mandatory-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-priority-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-replyTo-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-timestamp-type.yaml",
+ "tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-userId-type.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/valid-empty-object.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/mqtt/invalid-extra-properties.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/mqtt/valid.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/kafka/invalid-extra-properties.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/kafka/valid.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/kafka/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/kafka/Fields Types/invalid-key-type.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/http/invalid-extra-properties.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/http/invalid-headers-type.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/http/valid.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/http/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/http/Fields Types/invalid-headers-type.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/amqp/invalid-extra-properties.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/amqp/valid.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-contentEncoding-type.yaml",
+ "tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-messageType-type.yaml",
+ "tests/asyncapi-2.0/Correlation ID Object/invalid-location-expression.yaml",
+ "tests/asyncapi-2.0/Correlation ID Object/invalid-missing-location.yaml",
+ "tests/asyncapi-2.0/Correlation ID Object/valid.yaml",
+ "tests/asyncapi-2.0/Correlation ID Object/Fields Types/invalid-description-type.yaml",
+ "tests/asyncapi-2.0/Correlation ID Object/Fields Types/invalid-location-type.yaml",
+ "tests/asyncapi-2.0/Specification Extensions/valid.yaml"
+ ]
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 00000000..21333589
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,21 @@
+{
+ "name": "tck",
+ "version": "1.1.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "foreachasync": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz",
+ "integrity": "sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY="
+ },
+ "walk": {
+ "version": "2.3.14",
+ "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.14.tgz",
+ "integrity": "sha512-5skcWAUmySj6hkBdH6B6+3ddMjVQYH5Qy9QGbPmN8kVmLteXk+yVXg+yfk1nbX30EYakahLrr8iPcCxJQSCBeg==",
+ "requires": {
+ "foreachasync": "^3.0.0"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 00000000..2054ad6b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "tck",
+ "description": "AsyncAPI test compatibility kit",
+ "version": "1.1.0",
+ "main": "genmanifest.js tests/asyncapi-2.0",
+ "private": true,
+ "author": "AsyncAPI Team",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:asyncapi/tck.git"
+ },
+ "keywords": [
+ "asyncapi",
+ "test framework"
+ ],
+ "license": "Apache-2.0",
+ "dependencies": {
+ "walk": "^2.3.14"
+ },
+ "scripts": {
+ "gen-manifest": "node genmanifest.js tests/asyncapi-2.0"
+ }
+}
diff --git a/runner/.gitignore b/runner/.gitignore
new file mode 100644
index 00000000..9904b6f5
--- /dev/null
+++ b/runner/.gitignore
@@ -0,0 +1,68 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# TypeScript v1 declaration files
+typings/
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variables file
+.env
+
+# next.js build output
+.next
+
+# Java runner
+.gradle
+java/build/
+
+reports/json/
+reports/html/*.html
diff --git a/runner/Makefile b/runner/Makefile
new file mode 100644
index 00000000..443d7b10
--- /dev/null
+++ b/runner/Makefile
@@ -0,0 +1,45 @@
+ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+REPORTER_DIR:=$(ROOT_DIR)/html-reporter
+REPORTS_JSON:=$(ROOT_DIR)/reports/json
+JS_RUNNER_DIR:=$(ROOT_DIR)/js
+
+
+# asyncapi/tck branch with manifest.json in its root
+TCK_BRANCH:=add_tck_tests
+
+
+.ONESHELL:
+all: clean install report generate-html
+
+all-js: install-html-reporter \
+ install-js \
+ report-js \
+ generate-html
+
+install: install-html-reporter \
+ install-js
+
+install-html-reporter:
+ cd $(REPORTER_DIR)
+ npm install .
+
+install-js: clean-js
+ cd $(JS_RUNNER_DIR)
+ npm install .
+
+report: report-js
+
+report-js:
+ cd $(JS_RUNNER_DIR)
+ node src/index.js --parser asyncapi-parser --outdir $(REPORTS_JSON) --branch $(TCK_BRANCH)
+ node src/index.js --parser amf-client-js --outdir $(REPORTS_JSON) --branch $(TCK_BRANCH)
+
+generate-html:
+ cd $(REPORTER_DIR)
+ node src/index.js
+
+clean: clean-js
+ rm -f $(REPORTS_JSON)/*
+
+clean-js:
+ rm -rf $(JS_RUNNER_DIR)/node_modules
diff --git a/runner/README.md b/runner/README.md
new file mode 100644
index 00000000..01d9a7f1
--- /dev/null
+++ b/runner/README.md
@@ -0,0 +1,22 @@
+# asyncapi/tck/runner
+Run several AsyncAPI parsers/validators against https://github.com/asyncapi/tck
+
+## Generating report
+
+Following command will install all runners, run them and generate HTML report:
+```sh
+$ make
+```
+
+Then you can open generated HTML report (`reports/html/index.html`) in your browser.
+
+## JavaScript
+Parsers tested:
+* [asyncapi-parser](https://github.com/asyncapi/parser-js)
+* [amf-client-js](https://github.com/aml-org/amf)
+
+To generate only JS parsers report:
+```sh
+$ make clean
+$ make all-js
+```
diff --git a/runner/html-reporter/README.md b/runner/html-reporter/README.md
new file mode 100644
index 00000000..7b167ac4
--- /dev/null
+++ b/runner/html-reporter/README.md
@@ -0,0 +1,10 @@
+## Install and run
+
+1. Generate parsers json reports
+
+2.
+```sh
+$ npm install .
+$ node src/index.js
+$ browse ../reports/html/index.html
+```
diff --git a/runner/html-reporter/package-lock.json b/runner/html-reporter/package-lock.json
new file mode 100644
index 00000000..970e896c
--- /dev/null
+++ b/runner/html-reporter/package-lock.json
@@ -0,0 +1,13 @@
+{
+ "name": "asyncapi-tck-runner-reporter",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "mustache": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/mustache/-/mustache-3.2.1.tgz",
+ "integrity": "sha512-RERvMFdLpaFfSRIEe632yDm5nsd0SDKn8hGmcUwswnyiE5mtdZLDybtHAz6hjJhawokF0hXvGLtx9mrQfm6FkA=="
+ }
+ }
+}
diff --git a/runner/html-reporter/package.json b/runner/html-reporter/package.json
new file mode 100644
index 00000000..1975134a
--- /dev/null
+++ b/runner/html-reporter/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "asyncapi-tck-runner-reporter",
+ "version": "1.0.0",
+ "description": "",
+ "main": "src/index.js",
+ "scripts": {},
+ "keywords": [],
+ "author": "AsyncAPI Team",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "mustache": "^3.0.1"
+ },
+ "devDependencies": {}
+}
diff --git a/runner/html-reporter/src/index.js b/runner/html-reporter/src/index.js
new file mode 100644
index 00000000..462e6ba4
--- /dev/null
+++ b/runner/html-reporter/src/index.js
@@ -0,0 +1,144 @@
+const path = require('path')
+const fs = require('fs')
+const Mustache = require('mustache')
+
+/* Runs all the logic */
+function main () {
+ const reportsDir = path.join(__dirname, '..', '..', 'reports', 'json')
+ let stats = []
+ fs.readdirSync(reportsDir).forEach(fpath => {
+ if (!fpath.endsWith('.json')) {
+ return
+ }
+ let fullPath = path.join(reportsDir, fpath)
+ console.log(`Processing report: ${fullPath}`)
+ let report = JSON.parse(fs.readFileSync(fullPath))
+ interpretReport(report)
+ stats.push(composeReportStats(report))
+ renderTemplate(
+ report, 'detailed_report',
+ `${report.parser}_detailed_report`)
+
+ let featuresStats = composeFeaturesStats(report)
+ renderTemplate(
+ featuresStats, 'features_stats',
+ `${report.parser}_features_stats`)
+ })
+ renderTemplate({stats: stats}, 'index', 'index')
+}
+
+/*
+ * Inverts invalid files parsing results;
+ * Composes repo url from relative file path;
+ * Extracts "feature" name from file path;
+*/
+function interpretReport (report) {
+ const repo = `https://github.com/asyncapi/tck/tree/${report.branch}`
+ report.results.forEach(result => {
+ result.invalid = shouldFail(result.file)
+ if (result.invalid) {
+ delete result.error
+ result.success = !result.success
+ if (!result.success) {
+ result.error = 'Parsing expected to fail but succeeded'
+ }
+ }
+ result.file = result.file.startsWith('/')
+ ? result.file.slice(1)
+ : result.file
+ result.fileUrl = `${repo}/${result.file}`
+
+ // Pick first 3 directories names as a feature name
+ result.feature = path.dirname(result.file)
+ .split('/').slice(0, 3).join('/')
+ })
+}
+
+/*
+ Composes single parser report stats:
+ * number of successfully passed/total valid/invalid files tests;
+ * % of passed files tests;
+*/
+function composeReportStats (report) {
+ let stats = {
+ parser: report.parser,
+ valid: {success: 0, total: 0, successPerc: 0},
+ invalid: {success: 0, total: 0, successPerc: 0},
+ all: {success: 0, total: report.results.length, successPerc: 0}
+ }
+ const invalid = report.results.filter(r => { return r.invalid })
+ const invalidSuccess = invalid.filter(r => { return r.success })
+ stats.invalid.total = invalid.length
+ stats.invalid.success = invalidSuccess.length
+ stats.invalid.successPerc = calculateSuccessPerc(stats.invalid)
+
+ const valid = report.results.filter(r => { return !r.invalid })
+ const validSuccess = valid.filter(r => { return r.success })
+ stats.valid.total = valid.length
+ stats.valid.success = validSuccess.length
+ stats.valid.successPerc = calculateSuccessPerc(stats.valid)
+
+ stats.all.success = invalidSuccess.length + validSuccess.length
+ stats.all.successPerc = calculateSuccessPerc(stats.all)
+
+ return stats
+}
+
+/* Calculates success percentage */
+function calculateSuccessPerc (data) {
+ let successPerc = Math.round((data.success / data.total) * 100)
+ if (isNaN(successPerc)) {
+ successPerc = 100
+ }
+ return successPerc
+}
+
+/*
+ Composes single parser features report.
+ It includes features names and number of passed/all valid/invalid
+ files for each parser.
+*/
+function composeFeaturesStats (report) {
+ let frep = {
+ parser: report.parser,
+ stats: []
+ }
+ // Group by feature name
+ let grouped = {}
+ report.results.forEach(result => {
+ if (grouped[result.feature] === undefined) {
+ grouped[result.feature] = []
+ }
+ grouped[result.feature].push(result)
+ })
+ // Compose stats for each feature
+ for (var featureName in grouped) {
+ if (grouped.hasOwnProperty(featureName)) {
+ let stats = composeReportStats({
+ results: grouped[featureName]
+ })
+ stats.feature = featureName
+ frep.stats.push(stats)
+ }
+ }
+ return frep
+}
+
+/* Renders single Mustache template with data and writes it to html file */
+function renderTemplate (data, tmplName, htmlName) {
+ const inPath = path.join(
+ __dirname, '..', 'templates', `${tmplName}.mustache`)
+ const tmplStr = fs.readFileSync(inPath, 'utf-8')
+ const htmlStr = Mustache.render(tmplStr, data)
+ const outDir = path.join(__dirname, '..', '..', 'reports', 'html')
+ const outPath = path.join(outDir, `${htmlName}.html`)
+ fs.writeFileSync(outPath, htmlStr)
+ console.log(`Rendered HTML: ${outPath}`)
+}
+
+/* Checks whether a file is expected to fail */
+function shouldFail (fpath) {
+ return fpath.toLowerCase().includes('invalid')
+}
+
+main()
diff --git a/runner/html-reporter/templates/detailed_report.mustache b/runner/html-reporter/templates/detailed_report.mustache
new file mode 100644
index 00000000..d71fbcd5
--- /dev/null
+++ b/runner/html-reporter/templates/detailed_report.mustache
@@ -0,0 +1,89 @@
+
+
+
+ Detailed report: {{parser}}
+
+
+
+
+
+
+
+
+
Overview > Detailed report: {{parser}}
+
+
+
+
diff --git a/runner/html-reporter/templates/features_stats.mustache b/runner/html-reporter/templates/features_stats.mustache
new file mode 100644
index 00000000..9b9f362d
--- /dev/null
+++ b/runner/html-reporter/templates/features_stats.mustache
@@ -0,0 +1,44 @@
+
+
+
+ Features stats: {{parser}}
+
+
+
+
+
+
+
+
Overview > Features stats: {{parser}}
+
+
+
+ Feature |
+ Valid Files (passed/all) |
+ Invalid Files (passed/all) |
+ Total (passed/all) |
+
+
+
+ {{#stats}}
+
+ {{feature}} |
+
+ {{valid.successPerc}}%
+ ({{valid.success}}/{{valid.total}})
+ |
+
+ {{invalid.successPerc}}%
+ ({{invalid.success}}/{{invalid.total}})
+ |
+
+ {{all.successPerc}}%
+ ({{all.success}}/{{all.total}})
+ |
+
+ {{/stats}}
+
+
+
+
+
diff --git a/runner/html-reporter/templates/index.mustache b/runner/html-reporter/templates/index.mustache
new file mode 100644
index 00000000..b093456a
--- /dev/null
+++ b/runner/html-reporter/templates/index.mustache
@@ -0,0 +1,45 @@
+
+
+
+ AsyncAPI Parsers Overview
+
+
+
+
+
+
+
+
Overview
+
+
+
+ Parser |
+ Valid Files (passed/all) |
+ Invalid Files (passed/all) |
+ Total (passed/all) |
+ |
+
+
+
+ {{#stats}}
+
+ {{parser}} |
+
+ {{valid.successPerc}}%
+ ({{valid.success}}/{{valid.total}})
+ |
+
+ {{invalid.successPerc}}%
+ ({{invalid.success}}/{{invalid.total}}) |
+
+ {{all.successPerc}}%
+ ({{all.success}}/{{all.total}}) |
+ Detailed report |
+ Features stats |
+
+ {{/stats}}
+
+
+
+
+
diff --git a/runner/js/.gitignore b/runner/js/.gitignore
new file mode 100644
index 00000000..ad46b308
--- /dev/null
+++ b/runner/js/.gitignore
@@ -0,0 +1,61 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# TypeScript v1 declaration files
+typings/
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variables file
+.env
+
+# next.js build output
+.next
diff --git a/runner/js/README.md b/runner/js/README.md
new file mode 100644
index 00000000..3404a0b3
--- /dev/null
+++ b/runner/js/README.md
@@ -0,0 +1,47 @@
+## About
+
+Simple test of few AsyncAPI JS parsers. Tests simply try to parse a set of examples and report if parser returned an error.
+
+Running tests produces JSON reports.
+
+A fine collection of AsyncAPI files can be composed each containing one/few AsyncAPI features to test those in isolation.
+
+Uses [AsyncAPI/tck](https://github.com/asyncapi/tck/tests/asyncapi-2.0) as a source of AsyncAPI for tests.
+
+NOTE: If file name contains "invalid" parsing of it is expected to fail.
+
+## Install
+
+```sh
+$ git clone git@github.com:asyncapi/tck.git
+$ cd tck/runner/js
+$ npm install .
+```
+
+For testing parsers in local development, link them after the installation finishes:
+```sh
+$ npm link ~/projects/my-parser/
+```
+
+## Run
+
+```sh
+$ node src/index.js --parser PARSER_NAME --outdir ./reports/json --branch develop
+```
+
+## Options
+
+Parser:
+```sh
+$ node src/index.js --parser asyncapi-parser/amf-client-js
+```
+
+Output JSON report directory (defaults to `./`):
+```sh
+$ node src/index.js --parser asyncapi-parser --outdir ./reports/json --branch develop
+```
+
+AsyncAPI/tck branch to load AsyncAPI files from:
+```sh
+$ node src/index.js --parser asyncapi-parser --branch develop
+```
diff --git a/runner/js/package-lock.json b/runner/js/package-lock.json
new file mode 100644
index 00000000..ec80291c
--- /dev/null
+++ b/runner/js/package-lock.json
@@ -0,0 +1,319 @@
+{
+ "name": "asyncapi-tck-runner-js",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "ajv": {
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz",
+ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==",
+ "requires": {
+ "fast-deep-equal": "^2.0.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.1"
+ }
+ },
+ "amf-client-js": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/amf-client-js/-/amf-client-js-4.0.4.tgz",
+ "integrity": "sha512-2WsNFrLCa6oJTRHeMu80NKVD4b8vNfL37iUDLtxPp4n8ChdR4o39F2yuT4/V9qRBDgW2cLB1FXzvO8ZCHIHclg==",
+ "requires": {
+ "ajv": "6.5.2",
+ "amf-shacl-node": "1.1.1"
+ }
+ },
+ "amf-shacl-node": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/amf-shacl-node/-/amf-shacl-node-1.1.1.tgz",
+ "integrity": "sha512-CoW08R+Y5VluBhC0IT11yJMJqVfuYVa8JHKopL4sXXCgTjtKikn1dyfOmY/b/u0WVKmx787JVDb/HnTzOEVoiA=="
+ },
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "asyncapi": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/asyncapi/-/asyncapi-2.6.1.tgz",
+ "integrity": "sha512-ROszLQMYzyp/CzPyLhuT/9NpJXxI7wrjv6yW8JpA/XVMEWCqyVXr9jajJhs9d/863+ispS+ptGhg1PC17AnIzQ=="
+ },
+ "asyncapi-parser": {
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/asyncapi-parser/-/asyncapi-parser-0.13.0.tgz",
+ "integrity": "sha512-UTj9W8tfm0VKA5xkUbc8OBSLMrFOO3bXW4Rdrx6WTIiZjK1Mve3qkwOOXI15d4oCkTMhWjmh6AvHd51/61eemA==",
+ "requires": {
+ "ajv": "^6.10.1",
+ "asyncapi": "^2.6.1",
+ "js-yaml": "^3.13.1",
+ "json-schema-ref-parser": "^7.1.0",
+ "node-fetch": "^2.6.0",
+ "openapi-schema-to-json-schema": "^2.2.0",
+ "tiny-merge-patch": "^0.1.2"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.10.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
+ "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
+ "requires": {
+ "fast-deep-equal": "^2.0.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ }
+ }
+ },
+ "call-me-maybe": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
+ "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms="
+ },
+ "deep-equal": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz",
+ "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==",
+ "requires": {
+ "is-arguments": "^1.0.4",
+ "is-date-object": "^1.0.1",
+ "is-regex": "^1.0.4",
+ "object-is": "^1.0.1",
+ "object-keys": "^1.1.1",
+ "regexp.prototype.flags": "^1.2.0"
+ }
+ },
+ "define-properties": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+ "requires": {
+ "object-keys": "^1.0.12"
+ }
+ },
+ "es-abstract": {
+ "version": "1.17.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.2.tgz",
+ "integrity": "sha512-YoKuru3Lyoy7yVTBSH2j7UxTqe/je3dWAruC0sHvZX1GNd5zX8SSLvQqEgO9b3Ex8IW+goFI9arEEsFIbulhOw==",
+ "requires": {
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.1.5",
+ "is-regex": "^1.0.5",
+ "object-inspect": "^1.7.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.0",
+ "string.prototype.trimleft": "^2.1.1",
+ "string.prototype.trimright": "^2.1.1"
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "requires": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ }
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
+ },
+ "fast-deep-equal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
+ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
+ },
+ "fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
+ },
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-symbols": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+ "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
+ },
+ "is-arguments": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz",
+ "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA=="
+ },
+ "is-callable": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
+ "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q=="
+ },
+ "is-date-object": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
+ "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g=="
+ },
+ "is-regex": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
+ "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
+ "is-symbol": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
+ "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+ "requires": {
+ "has-symbols": "^1.0.1"
+ }
+ },
+ "js-yaml": {
+ "version": "3.13.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "json-schema-ref-parser": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-7.1.3.tgz",
+ "integrity": "sha512-/Lmyl0PW27dOmCO03PI339+1gs4Z2PlqIyUgzIOtoRp08zkkMCB30TRbdppbPO7WWzZX0uT98HqkDiZSujkmbA==",
+ "requires": {
+ "call-me-maybe": "^1.0.1",
+ "js-yaml": "^3.13.1",
+ "ono": "^6.0.0"
+ }
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
+ },
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
+ },
+ "mustache": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/mustache/-/mustache-3.2.1.tgz",
+ "integrity": "sha512-RERvMFdLpaFfSRIEe632yDm5nsd0SDKn8hGmcUwswnyiE5mtdZLDybtHAz6hjJhawokF0hXvGLtx9mrQfm6FkA=="
+ },
+ "node-fetch": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
+ "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
+ },
+ "object-inspect": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
+ "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw=="
+ },
+ "object-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz",
+ "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ=="
+ },
+ "object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
+ },
+ "object.assign": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
+ "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
+ "requires": {
+ "define-properties": "^1.1.2",
+ "function-bind": "^1.1.1",
+ "has-symbols": "^1.0.0",
+ "object-keys": "^1.0.11"
+ }
+ },
+ "ono": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ono/-/ono-6.0.1.tgz",
+ "integrity": "sha512-5rdYW/106kHqLeG22GE2MHKq+FlsxMERZev9DCzQX1zwkxnFwBivSn5i17a5O/rDmOJOdf4Wyt80UZljzx9+DA=="
+ },
+ "openapi-schema-to-json-schema": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/openapi-schema-to-json-schema/-/openapi-schema-to-json-schema-2.2.0.tgz",
+ "integrity": "sha512-a8ouPAEl7U4MCpQBje+9cDIDSL6xCtWBPat/2i2Py42D5q9EPuB0IkXh4mNRc/cECjHjsgsEn2+GTeMvgE58+w==",
+ "requires": {
+ "deep-equal": "^1.0.1"
+ }
+ },
+ "punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
+ },
+ "regexp.prototype.flags": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz",
+ "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==",
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0-next.1"
+ }
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
+ },
+ "string.prototype.trimleft": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz",
+ "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==",
+ "requires": {
+ "define-properties": "^1.1.3",
+ "function-bind": "^1.1.1"
+ }
+ },
+ "string.prototype.trimright": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz",
+ "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==",
+ "requires": {
+ "define-properties": "^1.1.3",
+ "function-bind": "^1.1.1"
+ }
+ },
+ "tiny-merge-patch": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/tiny-merge-patch/-/tiny-merge-patch-0.1.2.tgz",
+ "integrity": "sha1-Lo3tGcVuoV29OtTtXbHI5a1UTDw="
+ },
+ "uri-js": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
+ "requires": {
+ "punycode": "^2.1.0"
+ }
+ }
+ }
+}
diff --git a/runner/js/package.json b/runner/js/package.json
new file mode 100644
index 00000000..f2742213
--- /dev/null
+++ b/runner/js/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "asyncapi-tck-runner-js",
+ "version": "1.0.0",
+ "description": "Simple test of few AsyncAPI JS parsers.",
+ "main": "src/index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "keywords": [],
+ "author": "MuleSoft",
+ "license": "ISC",
+ "dependencies": {
+ "amf-client-js": "^4.0.4",
+ "asyncapi-parser": "^0.13.0",
+ "minimist": "^1.2.0",
+ "mustache": "^3.0.1"
+ },
+ "devDependencies": {}
+}
diff --git a/runner/js/src/index.js b/runner/js/src/index.js
new file mode 100644
index 00000000..127440bd
--- /dev/null
+++ b/runner/js/src/index.js
@@ -0,0 +1,53 @@
+const parseArgs = require('minimist')
+const path = require('path')
+const parsers = require('./parsers')
+const utils = require('./utils')
+
+const TCK_DIR = path.resolve(path.join(
+ __dirname, // tck/runner/js/src
+ '..', // tck/runner/js
+ '..', // tck/runner
+ '..' // tck
+))
+
+const PARSERS = {
+ 'amf-client-js': parsers.amfParse,
+ 'asyncapi-parser': parsers.asyncapiParse
+}
+
+async function main () {
+ const argv = parseArgs(process.argv.slice(2))
+ const parserFunc = PARSERS[argv.parser]
+ if (parserFunc === undefined) {
+ console.log(`Not supported parser: ${argv.parser}`)
+ return
+ }
+
+ const fileList = utils.listFiles(TCK_DIR)
+ let report = {
+ parser: argv.parser + '(js)',
+ results: [],
+ branch: argv.branch
+ }
+
+ for (let i = 0; i < fileList.length; i++) {
+ let fpath = fileList[i]
+ let success = true
+ let error
+ try {
+ await parserFunc(fpath)
+ } catch (e) {
+ success = false
+ error = e
+ }
+ report.results.push({
+ file: fpath.replace(TCK_DIR, ''),
+ success: success,
+ error: error ? error.toString() : error
+ })
+ }
+
+ utils.saveReport(report, argv.outdir || './')
+}
+
+main()
diff --git a/runner/js/src/parsers.js b/runner/js/src/parsers.js
new file mode 100644
index 00000000..e26baa3a
--- /dev/null
+++ b/runner/js/src/parsers.js
@@ -0,0 +1,37 @@
+const fs = require('fs')
+
+const asyncapi = require('asyncapi-parser')
+const amf = require('amf-client-js')
+
+// https://github.com/asyncapi/parser-js
+async function asyncapiParse (fpath) {
+ const content = fs.readFileSync(fpath).toString()
+ // According to parser's API, it:
+ // "Parses and validate an AsyncAPI document from YAML or JSON"
+ try {
+ await asyncapi.parse(content)
+ } catch (e) {
+ throw new Error(e.message || e.toString())
+ }
+}
+
+// https://github.com/aml-org/amf
+async function amfParse (fpath) {
+ await amf.AMF.init()
+ const parser = amf.Core.parser('ASYNC 2.0', 'application/yaml')
+ const model = await parser.parseFileAsync(`file://${fpath}`)
+ const report = await amf.AMF.validate(
+ model, amf.ProfileNames.ASYNC20, amf.MessageStyles.ASYNC)
+ if (!report.conforms) {
+ report.results.map(res => {
+ if (res.level.toLowerCase() === 'violation') {
+ throw new Error(res.message)
+ }
+ })
+ }
+}
+
+module.exports = {
+ asyncapiParse: asyncapiParse,
+ amfParse: amfParse
+}
diff --git a/runner/js/src/utils.js b/runner/js/src/utils.js
new file mode 100644
index 00000000..beeaca65
--- /dev/null
+++ b/runner/js/src/utils.js
@@ -0,0 +1,22 @@
+const path = require('path')
+const fs = require('fs')
+
+/* Lists spec files in folder */
+function listFiles (foldPath) {
+ const manifestPath = path.join(foldPath, 'manifest.json')
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'))
+ return manifest.filePaths.map(fp => path.join(foldPath, fp))
+}
+
+/* Writes JSON report to output folder */
+function saveReport (report, outdir) {
+ outdir = path.resolve(outdir)
+ try { fs.mkdirSync(outdir) } catch (e) {}
+ const fpath = path.join(outdir, `${report.parser}.json`)
+ fs.writeFileSync(fpath, JSON.stringify(report, null, 2))
+}
+
+module.exports = {
+ listFiles: listFiles,
+ saveReport: saveReport
+}
diff --git a/runner/reports/html/bootstrap.min.css b/runner/reports/html/bootstrap.min.css
new file mode 100644
index 00000000..6c098131
--- /dev/null
+++ b/runner/reports/html/bootstrap.min.css
@@ -0,0 +1,14 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2018 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*!
+ * Generated using the Bootstrap Customizer ()
+ * Config saved to config.json and
+ *//*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:hover,a:focus{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}kbd kbd{padding:0;font-size:100%;font-weight:bold;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important}.affix{position:fixed}
\ No newline at end of file
diff --git a/runner/reports/html/custom.css b/runner/reports/html/custom.css
new file mode 100644
index 00000000..38735b86
--- /dev/null
+++ b/runner/reports/html/custom.css
@@ -0,0 +1,7 @@
+.stat-nums {
+ color: #afafaf;
+ opacity: 0;
+}
+tr:hover .stat-nums {
+ opacity: 1;
+}
\ No newline at end of file
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-asyncapi-type.yaml b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-asyncapi-type.yaml
new file mode 100644
index 00000000..39ba5fd5
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-asyncapi-type.yaml
@@ -0,0 +1,17 @@
+asyncapi:
+ prop: 1
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-channels-type.yaml b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-channels-type.yaml
new file mode 100644
index 00000000..0144210a
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-channels-type.yaml
@@ -0,0 +1,7 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels: 123
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-components-type.yaml b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-components-type.yaml
new file mode 100644
index 00000000..d0f3849f
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-components-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components: 123
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-externalDocs-type.yaml b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-externalDocs-type.yaml
new file mode 100644
index 00000000..45fe07fa
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-externalDocs-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+externalDocs: 123
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-id-type.yaml b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-id-type.yaml
new file mode 100644
index 00000000..3d6fd04e
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-id-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+id:
+ prop: 1
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-info-type.yaml b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-info-type.yaml
new file mode 100644
index 00000000..0c894d94
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-info-type.yaml
@@ -0,0 +1,14 @@
+asyncapi: 2.0.0
+
+info: 123
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-servers-type.yaml b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-servers-type.yaml
new file mode 100644
index 00000000..bf8aa30c
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-servers-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+servers: 123
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-tags-type.yaml b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-tags-type.yaml
new file mode 100644
index 00000000..b014d9e8
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/Fields Types/invalid-tags-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+tags: 123
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/invalid-duplicate-tags.yaml b/tests/asyncapi-2.0/AsyncAPI Object/invalid-duplicate-tags.yaml
new file mode 100644
index 00000000..828e5846
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/invalid-duplicate-tags.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+tags:
+ - name: user
+ description: user signed up
+ - name: user
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-asyncapi.yaml b/tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-asyncapi.yaml
new file mode 100644
index 00000000..94c1e232
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-asyncapi.yaml
@@ -0,0 +1,14 @@
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-channels.yaml b/tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-channels.yaml
new file mode 100644
index 00000000..4f9f99dc
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-channels.yaml
@@ -0,0 +1,5 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-info.yaml b/tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-info.yaml
new file mode 100644
index 00000000..0f175248
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/invalid-missing-info.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Object/valid.yaml b/tests/asyncapi-2.0/AsyncAPI Object/valid.yaml
new file mode 100644
index 00000000..4e33bd5a
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Object/valid.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+defaultContentType: application/json
+
+externalDocs:
+ description: Find more info here
+ url: https://example.com
+
+tags:
+ - name: user
+ description: user signed up
+ - name: signup
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Version String/invalid-missing-patch.yaml b/tests/asyncapi-2.0/AsyncAPI Version String/invalid-missing-patch.yaml
new file mode 100644
index 00000000..66fe3217
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Version String/invalid-missing-patch.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Version String/invalid-version-string-format.yaml b/tests/asyncapi-2.0/AsyncAPI Version String/invalid-version-string-format.yaml
new file mode 100644
index 00000000..6963fbfe
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Version String/invalid-version-string-format.yaml
@@ -0,0 +1,16 @@
+asyncapi: welcome
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Version String/valid-major-minor-patch.yaml b/tests/asyncapi-2.0/AsyncAPI Version String/valid-major-minor-patch.yaml
new file mode 100644
index 00000000..2daeb076
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Version String/valid-major-minor-patch.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/AsyncAPI Version String/valid-with-hyphen.yaml b/tests/asyncapi-2.0/AsyncAPI Version String/valid-with-hyphen.yaml
new file mode 100644
index 00000000..a66fb8e7
--- /dev/null
+++ b/tests/asyncapi-2.0/AsyncAPI Version String/valid-with-hyphen.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0.0-rc2
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..50aa83c0
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-autoDelete-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-autoDelete-type.yaml
new file mode 100644
index 00000000..16a1a487
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-autoDelete-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: qwe
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-durable-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-durable-type.yaml
new file mode 100644
index 00000000..dcdd16ef
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-durable-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: qwe
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-name-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-name-type.yaml
new file mode 100644
index 00000000..9d3efb97
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-name-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name:
+ prop: 1
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-type-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-type-type.yaml
new file mode 100644
index 00000000..e749a3a7
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-type-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type:
+ prop: 1
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-type.yaml
new file mode 100644
index 00000000..f9daf6fa
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-type.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange: 123
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-vhost-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-vhost-type.yaml
new file mode 100644
index 00000000..f2a3c185
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-exchange-vhost-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost:
+ prop: 1
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-is-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-is-type.yaml
new file mode 100644
index 00000000..25940f97
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-is-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is:
+ prop: 1
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-autoDelete-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-autoDelete-type.yaml
new file mode 100644
index 00000000..24c13e99
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-autoDelete-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: qwe
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-durable-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-durable-type.yaml
new file mode 100644
index 00000000..7bb205b9
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-durable-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: qwe
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-exclusive-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-exclusive-type.yaml
new file mode 100644
index 00000000..02cf54c1
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-exclusive-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: qwe
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-name-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-name-type.yaml
new file mode 100644
index 00000000..c15c3c3d
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-name-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name:
+ prop: 1
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-type.yaml
new file mode 100644
index 00000000..fc58ae1e
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-type.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue: 123
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-vhost-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-vhost-type.yaml
new file mode 100644
index 00000000..856c8eb1
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/Fields Types/invalid-queue-vhost-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost:
+ prop: 1
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-exchange-name-length.yaml.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-exchange-name-length.yaml.yaml
new file mode 100644
index 00000000..827d4115
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-exchange-name-length.yaml.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-exchange-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-exchange-type.yaml
new file mode 100644
index 00000000..da19df94
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-exchange-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: invalidType
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-is-value.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-is-value.yaml
new file mode 100644
index 00000000..02d5b965
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-is-value.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: invalidValue
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-queue-name-length.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-queue-name-length.yaml
new file mode 100644
index 00000000..c34c5a15
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/invalid-queue-name-length.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/amqp/valid.yaml b/tests/asyncapi-2.0/Channel Bindings Object/amqp/valid.yaml
new file mode 100644
index 00000000..085bfb10
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/amqp/valid.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Channel Bindings Object/valid-empty-object.yaml
new file mode 100644
index 00000000..2d2ff9b7
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/valid-empty-object.yaml
@@ -0,0 +1,13 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..4d77ff09
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ ws:
+ method: GET
+ query:
+ type: object
+ properties:
+ userId:
+ type: string
+ headers:
+ type: object
+ properties:
+ UserType:
+ type: string
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-headers-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-headers-type.yaml
new file mode 100644
index 00000000..86982a05
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-headers-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ ws:
+ method: GET
+ query:
+ type: object
+ properties:
+ userId:
+ type: string
+ headers: 123
+ bindingVersion: '1.1.1'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-method-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-method-type.yaml
new file mode 100644
index 00000000..58a9faf7
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-method-type.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ ws:
+ method:
+ prop: 1
+ query:
+ type: object
+ properties:
+ userId:
+ type: string
+ headers:
+ type: object
+ properties:
+ UserType:
+ type: string
+ bindingVersion: '1.1.1'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-query-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-query-type.yaml
new file mode 100644
index 00000000..2f4a81c2
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/ws/Fields Types/invalid-query-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ ws:
+ method: GET
+ query: 123
+ headers:
+ type: object
+ properties:
+ UserType:
+ type: string
+ bindingVersion: '1.1.1'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-extra-properties.yaml b/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-extra-properties.yaml
new file mode 100644
index 00000000..3f221ea2
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-extra-properties.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ ws:
+ method: GET
+ query:
+ type: object
+ properties:
+ userId:
+ type: string
+ headers:
+ type: object
+ properties:
+ UserType:
+ type: string
+ bindingVersion: '1.1.1'
+ hello: 1
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-headers-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-headers-type.yaml
new file mode 100644
index 00000000..f9a5557b
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-headers-type.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ ws:
+ method: GET
+ query:
+ type: object
+ properties:
+ userId:
+ type: string
+ headers:
+ type: string
+ bindingVersion: '1.1.1'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-method.yaml b/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-method.yaml
new file mode 100644
index 00000000..c7458643
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-method.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ ws:
+ method: OPTIONS
+ query:
+ type: object
+ properties:
+ userId:
+ type: string
+ headers:
+ type: object
+ properties:
+ UserType:
+ type: string
+ bindingVersion: '1.1.1'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-query-type.yaml b/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-query-type.yaml
new file mode 100644
index 00000000..e5309d84
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/ws/invalid-query-type.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ ws:
+ method: GET
+ query:
+ type: string
+ headers:
+ type: object
+ properties:
+ UserType:
+ type: string
+ bindingVersion: '1.1.1'
diff --git a/tests/asyncapi-2.0/Channel Bindings Object/ws/valid.yaml b/tests/asyncapi-2.0/Channel Bindings Object/ws/valid.yaml
new file mode 100644
index 00000000..cf15c64d
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Bindings Object/ws/valid.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: string
+ bindings:
+ ws:
+ method: GET
+ query:
+ type: object
+ properties:
+ userId:
+ type: string
+ headers:
+ type: object
+ properties:
+ UserType:
+ type: string
+ bindingVersion: '1.1.1'
diff --git a/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-bindings-type.yaml b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-bindings-type.yaml
new file mode 100644
index 00000000..b6c94121
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-bindings-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ description: hello
+ bindings: 123
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..68db6edd
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ description:
+ prop: 1
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-parameters-type.yaml b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-parameters-type.yaml
new file mode 100644
index 00000000..139c2050
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-parameters-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup/{id}:
+ description: hello
+ parameters: 123
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-publish-type.yaml b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-publish-type.yaml
new file mode 100644
index 00000000..d258def8
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-publish-type.yaml
@@ -0,0 +1,9 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish: 123
diff --git a/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-ref-type.yaml b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-ref-type.yaml
new file mode 100644
index 00000000..bc95d5d5
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-ref-type.yaml
@@ -0,0 +1,10 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ $ref:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-subscribe-type.yaml b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-subscribe-type.yaml
new file mode 100644
index 00000000..234d735d
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/Fields Types/invalid-subscribe-type.yaml
@@ -0,0 +1,9 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe: 123
diff --git a/tests/asyncapi-2.0/Channel Item Object/invalid-external-ref-structure.yaml b/tests/asyncapi-2.0/Channel Item Object/invalid-external-ref-structure.yaml
new file mode 100644
index 00000000..c8c29ee0
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/invalid-external-ref-structure.yaml
@@ -0,0 +1,9 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ $ref: referencedInvalid.yml
diff --git a/tests/asyncapi-2.0/Channel Item Object/referenced.yml b/tests/asyncapi-2.0/Channel Item Object/referenced.yml
new file mode 100644
index 00000000..ab8b9894
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/referenced.yml
@@ -0,0 +1,12 @@
+subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Channel Item Object/referencedInvalid.yml b/tests/asyncapi-2.0/Channel Item Object/referencedInvalid.yml
new file mode 100644
index 00000000..ef65571b
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/referencedInvalid.yml
@@ -0,0 +1,3 @@
+email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Channel Item Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Channel Item Object/valid-empty-object.yaml
new file mode 100644
index 00000000..d5b46d94
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/valid-empty-object.yaml
@@ -0,0 +1,8 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
diff --git a/tests/asyncapi-2.0/Channel Item Object/valid-external-ref.yaml b/tests/asyncapi-2.0/Channel Item Object/valid-external-ref.yaml
new file mode 100644
index 00000000..607b02aa
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/valid-external-ref.yaml
@@ -0,0 +1,9 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ $ref: referenced.yml
diff --git a/tests/asyncapi-2.0/Channel Item Object/valid-publish.yaml b/tests/asyncapi-2.0/Channel Item Object/valid-publish.yaml
new file mode 100644
index 00000000..7946445b
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/valid-publish.yaml
@@ -0,0 +1,13 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ description: User signed up
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Channel Item Object/valid-subscribe.yaml b/tests/asyncapi-2.0/Channel Item Object/valid-subscribe.yaml
new file mode 100644
index 00000000..e5912699
--- /dev/null
+++ b/tests/asyncapi-2.0/Channel Item Object/valid-subscribe.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ description: User signed up
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Channels Object/Fields Types/invalid-channel-type.yaml b/tests/asyncapi-2.0/Channels Object/Fields Types/invalid-channel-type.yaml
new file mode 100644
index 00000000..4135f8db
--- /dev/null
+++ b/tests/asyncapi-2.0/Channels Object/Fields Types/invalid-channel-type.yaml
@@ -0,0 +1,8 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup: 123
diff --git a/tests/asyncapi-2.0/Channels Object/invalid-query-param-used.yaml b/tests/asyncapi-2.0/Channels Object/invalid-query-param-used.yaml
new file mode 100644
index 00000000..0b651e41
--- /dev/null
+++ b/tests/asyncapi-2.0/Channels Object/invalid-query-param-used.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup?foo=1:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Channels Object/valid.yaml b/tests/asyncapi-2.0/Channels Object/valid.yaml
new file mode 100644
index 00000000..2daeb076
--- /dev/null
+++ b/tests/asyncapi-2.0/Channels Object/valid.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-channelBindings-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-channelBindings-type.yaml
new file mode 100644
index 00000000..2a7eae49
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-channelBindings-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ channelBindings: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-correlationIds-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-correlationIds-type.yaml
new file mode 100644
index 00000000..a198c3c7
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-correlationIds-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ correlationIds: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-messageBindings-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-messageBindings-type.yaml
new file mode 100644
index 00000000..ee0b3d28
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-messageBindings-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ messageBindings: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-messageTraits-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-messageTraits-type.yaml
new file mode 100644
index 00000000..d912e6aa
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-messageTraits-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ messageTraits: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-messages-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-messages-type.yaml
new file mode 100644
index 00000000..9e8f473c
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-messages-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ messages: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-operationBindings-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-operationBindings-type.yaml
new file mode 100644
index 00000000..53dc317e
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-operationBindings-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ operationBindings: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-operationTraits-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-operationTraits-type.yaml
new file mode 100644
index 00000000..ace3b205
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-operationTraits-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ operationTraits: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-parameters-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-parameters-type.yaml
new file mode 100644
index 00000000..376a0b3c
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-parameters-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ parameters: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-schemas-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-schemas-type.yaml
new file mode 100644
index 00000000..ef15d710
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-schemas-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ schemas: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-securitySchemes-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-securitySchemes-type.yaml
new file mode 100644
index 00000000..87581e29
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-securitySchemes-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ securitySchemes: 123
diff --git a/tests/asyncapi-2.0/Components Object/Fields Types/invalid-serverBindings-type.yaml b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-serverBindings-type.yaml
new file mode 100644
index 00000000..a4005c99
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/Fields Types/invalid-serverBindings-type.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+components:
+ serverBindings: 123
diff --git a/tests/asyncapi-2.0/Components Object/invalid-channelBindings-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-channelBindings-key.yaml
new file mode 100644
index 00000000..e81b12eb
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-channelBindings-key.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ channelBindings:
+ inval#d:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Components Object/invalid-correlationIds-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-correlationIds-key.yaml
new file mode 100644
index 00000000..6cbea6dd
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-correlationIds-key.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ correlationIds:
+ inval#d:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
diff --git a/tests/asyncapi-2.0/Components Object/invalid-messageBindings-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-messageBindings-key.yaml
new file mode 100644
index 00000000..92cab67f
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-messageBindings-key.yaml
@@ -0,0 +1,24 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ messageBindings:
+ inval#d:
+ amqp:
+ contentEncoding: gzip
+ messageType: 'user.signup'
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Components Object/invalid-messageTraits-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-messageTraits-key.yaml
new file mode 100644
index 00000000..489d2414
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-messageTraits-key.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ messageTraits:
+ inval#d:
+ contentType: application/json
diff --git a/tests/asyncapi-2.0/Components Object/invalid-messages-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-messages-key.yaml
new file mode 100644
index 00000000..47826244
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-messages-key.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ messages:
+ inval#d:
+ contentType: application/json
diff --git a/tests/asyncapi-2.0/Components Object/invalid-operationBindings-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-operationBindings-key.yaml
new file mode 100644
index 00000000..37af3c0c
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-operationBindings-key.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ operationBindings:
+ inval#d:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Components Object/invalid-operationTraits-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-operationTraits-key.yaml
new file mode 100644
index 00000000..8eea6a68
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-operationTraits-key.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ operationTraits:
+ inval#d:
+ description: user signed up to load some data
diff --git a/tests/asyncapi-2.0/Components Object/invalid-parameters-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-parameters-key.yaml
new file mode 100644
index 00000000..7a04769b
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-parameters-key.yaml
@@ -0,0 +1,24 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ parameters:
+ inval#d:
+ description: Id of the user.
+ schema:
+ type: string
+ location: $message.payload#/user/id
diff --git a/tests/asyncapi-2.0/Components Object/invalid-schemas-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-schemas-key.yaml
new file mode 100644
index 00000000..74f91827
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-schemas-key.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ schemas:
+ inval#d:
+ type: object
+ properties:
+ correlationId:
+ description: Correlation ID set by application
+ type: string
+ applicationInstanceId:
+ description: Unique identifier
+ type: string
diff --git a/tests/asyncapi-2.0/Components Object/invalid-securitySchemes-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-securitySchemes-key.yaml
new file mode 100644
index 00000000..82caf738
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-securitySchemes-key.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ securitySchemes:
+ inval#d:
+ type: httpApiKey
+ name: Api-Key
+ in: header
diff --git a/tests/asyncapi-2.0/Components Object/invalid-serverBindings-key.yaml b/tests/asyncapi-2.0/Components Object/invalid-serverBindings-key.yaml
new file mode 100644
index 00000000..dcb383c4
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/invalid-serverBindings-key.yaml
@@ -0,0 +1,30 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ serverBindings:
+ inval#d:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 2
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Components Object/valid-complete.yaml b/tests/asyncapi-2.0/Components Object/valid-complete.yaml
new file mode 100644
index 00000000..5f2ad1a1
--- /dev/null
+++ b/tests/asyncapi-2.0/Components Object/valid-complete.yaml
@@ -0,0 +1,149 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
+ security:
+ - simple: []
+ bindings:
+ $ref: "#/components/serverBindings/myServerBindings"
+
+channels:
+ /user/{userId}/signedup:
+ parameters:
+ userId:
+ $ref: "#/components/parameters/userId"
+ bindings:
+ $ref: "#/components/channelBindings/myChannelBindings"
+ subscribe:
+ bindings:
+ $ref: "#/components/operationBindings/myOperationBindings"
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ message:
+ $ref: "#/components/messages/userSignedUpMessage"
+
+components:
+ schemas:
+ userSignedUpHeaders:
+ type: object
+ properties:
+ correlationId:
+ description: Correlation ID set by application
+ type: string
+ applicationInstanceId:
+ description: Unique identifier
+ type: string
+ messages:
+ userSignedUpMessage:
+ name: UserSignup
+ title: User signup
+ summary: Action to sign a user up.
+ description: A longer description
+ contentType: application/json
+ schemaFormat: application/vnd.oai.openapi;version=3.0.0
+ correlationId:
+ $ref: "#/components/correlationIds/userSignedUpCorId"
+ headers:
+ $ref: "#/components/schemas/userSignedUpHeaders"
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessageTrait"
+ bindings:
+ $ref: "#/components/messageBindings/myMessageBindings"
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ securitySchemes:
+ simple:
+ type: httpApiKey
+ name: Api-Key
+ in: header
+ parameters:
+ userId:
+ description: Id of the user.
+ schema:
+ type: string
+ location: $message.payload#/user/id
+ correlationIds:
+ userSignedUpCorId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
+ operationTraits:
+ userSignedUpTrait:
+ description: user signed up to load some data
+ messageTraits:
+ signedUpMessageTrait:
+ name: UserSignup
+ title: User signup
+ summary: Action to sign a user up.
+ description: A longer description
+ contentType: application/json
+ schemaFormat: application/vnd.oai.openapi;version=3.0.0
+ correlationId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
+ headers:
+ type: object
+ properties:
+ applicationInstanceId:
+ description: Unique identifier
+ type: string
+ serverBindings:
+ myServerBindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 2
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
+ channelBindings:
+ myChannelBindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
+ operationBindings:
+ myOperationBindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
+ messageBindings:
+ myMessageBindings:
+ amqp:
+ contentEncoding: gzip
+ messageType: 'user.signup'
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Contact Object/Fields Types/invalid-email-type.yaml b/tests/asyncapi-2.0/Contact Object/Fields Types/invalid-email-type.yaml
new file mode 100644
index 00000000..3e399c97
--- /dev/null
+++ b/tests/asyncapi-2.0/Contact Object/Fields Types/invalid-email-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ contact:
+ name: API Support
+ url: http://www.asyncapi.org/support
+ email:
+ prop: 1
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Contact Object/Fields Types/invalid-name-type.yaml b/tests/asyncapi-2.0/Contact Object/Fields Types/invalid-name-type.yaml
new file mode 100644
index 00000000..dec0be63
--- /dev/null
+++ b/tests/asyncapi-2.0/Contact Object/Fields Types/invalid-name-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ contact:
+ name:
+ prop: 1
+ url: http://www.asyncapi.org/support
+ email: support@asyncapi.org
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Contact Object/Fields Types/invalid-url-type.yaml b/tests/asyncapi-2.0/Contact Object/Fields Types/invalid-url-type.yaml
new file mode 100644
index 00000000..36474747
--- /dev/null
+++ b/tests/asyncapi-2.0/Contact Object/Fields Types/invalid-url-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ contact:
+ name: API Support
+ url:
+ prop: 1
+ email: support@asyncapi.org
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Contact Object/invalid-email-format.yaml b/tests/asyncapi-2.0/Contact Object/invalid-email-format.yaml
new file mode 100644
index 00000000..cb9e3afd
--- /dev/null
+++ b/tests/asyncapi-2.0/Contact Object/invalid-email-format.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ contact:
+ name: API Support
+ url: http://www.asyncapi.org/support
+ email: is not in the format of an email address
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Contact Object/invalid-url-format.yaml b/tests/asyncapi-2.0/Contact Object/invalid-url-format.yaml
new file mode 100644
index 00000000..189fb905
--- /dev/null
+++ b/tests/asyncapi-2.0/Contact Object/invalid-url-format.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ contact:
+ name: API Support
+ url: is not in the format of a URL
+ email: support@asyncapi.org
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Contact Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Contact Object/valid-empty-object.yaml
new file mode 100644
index 00000000..906e3444
--- /dev/null
+++ b/tests/asyncapi-2.0/Contact Object/valid-empty-object.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ contact:
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Contact Object/valid.yaml b/tests/asyncapi-2.0/Contact Object/valid.yaml
new file mode 100644
index 00000000..fd4ee3e9
--- /dev/null
+++ b/tests/asyncapi-2.0/Contact Object/valid.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ contact:
+ name: API Support
+ url: http://www.asyncapi.org/support
+ email: support@asyncapi.org
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Correlation ID Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Correlation ID Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..63afaba9
--- /dev/null
+++ b/tests/asyncapi-2.0/Correlation ID Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ summary: user signed up
+ description: user signed up to load some data
+ message:
+ contentType: application/json
+ correlationId:
+ $ref: "#/components/correlationIds/userSignedUpCorId"
+
+components:
+ correlationIds:
+ userSignedUpCorId:
+ description:
+ prop: 1
+ location: $message.header#/correlationId
diff --git a/tests/asyncapi-2.0/Correlation ID Object/Fields Types/invalid-location-type.yaml b/tests/asyncapi-2.0/Correlation ID Object/Fields Types/invalid-location-type.yaml
new file mode 100644
index 00000000..ef0bcdd1
--- /dev/null
+++ b/tests/asyncapi-2.0/Correlation ID Object/Fields Types/invalid-location-type.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ summary: user signed up
+ description: user signed up to load some data
+ message:
+ contentType: application/json
+ correlationId:
+ $ref: "#/components/correlationIds/userSignedUpCorId"
+
+components:
+ correlationIds:
+ userSignedUpCorId:
+ description: Default Correlation ID
+ location:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Correlation ID Object/invalid-location-expression.yaml b/tests/asyncapi-2.0/Correlation ID Object/invalid-location-expression.yaml
new file mode 100644
index 00000000..27d052e1
--- /dev/null
+++ b/tests/asyncapi-2.0/Correlation ID Object/invalid-location-expression.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ summary: user signed up
+ description: user signed up to load some data
+ message:
+ contentType: application/json
+ correlationId:
+ $ref: "#/components/correlationIds/userSignedUpCorId"
+
+components:
+ correlationIds:
+ userSignedUpCorId:
+ description: Default Correlation ID
+ location: not a valid runtime expression
diff --git a/tests/asyncapi-2.0/Correlation ID Object/invalid-missing-location.yaml b/tests/asyncapi-2.0/Correlation ID Object/invalid-missing-location.yaml
new file mode 100644
index 00000000..856dc569
--- /dev/null
+++ b/tests/asyncapi-2.0/Correlation ID Object/invalid-missing-location.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ summary: user signed up
+ description: user signed up to load some data
+ message:
+ contentType: application/json
+ correlationId:
+ $ref: "#/components/correlationIds/userSignedUpCorId"
+
+components:
+ correlationIds:
+ userSignedUpCorId:
+ description: Default Correlation ID
diff --git a/tests/asyncapi-2.0/Correlation ID Object/valid.yaml b/tests/asyncapi-2.0/Correlation ID Object/valid.yaml
new file mode 100644
index 00000000..50647139
--- /dev/null
+++ b/tests/asyncapi-2.0/Correlation ID Object/valid.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ summary: user signed up
+ description: user signed up to load some data
+ message:
+ contentType: application/json
+ correlationId:
+ $ref: "#/components/correlationIds/userSignedUpCorId"
+
+components:
+ correlationIds:
+ userSignedUpCorId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
diff --git a/tests/asyncapi-2.0/External Documentation Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/External Documentation Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..682a80f8
--- /dev/null
+++ b/tests/asyncapi-2.0/External Documentation Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+externalDocs:
+ description:
+ prop: 1
+ url: https://example.com
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/External Documentation Object/Fields Types/invalid-url-type.yaml b/tests/asyncapi-2.0/External Documentation Object/Fields Types/invalid-url-type.yaml
new file mode 100644
index 00000000..e7d67b90
--- /dev/null
+++ b/tests/asyncapi-2.0/External Documentation Object/Fields Types/invalid-url-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+externalDocs:
+ description: Find more info here
+ url:
+ prop: 1
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/External Documentation Object/invalid-missing-url.yaml b/tests/asyncapi-2.0/External Documentation Object/invalid-missing-url.yaml
new file mode 100644
index 00000000..73841048
--- /dev/null
+++ b/tests/asyncapi-2.0/External Documentation Object/invalid-missing-url.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+externalDocs:
+ description: Find more info here
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/External Documentation Object/invalid-url-format.yaml b/tests/asyncapi-2.0/External Documentation Object/invalid-url-format.yaml
new file mode 100644
index 00000000..f1b4ca26
--- /dev/null
+++ b/tests/asyncapi-2.0/External Documentation Object/invalid-url-format.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+externalDocs:
+ description: Find more info here
+ url: invalid url format
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/External Documentation Object/valid.yaml b/tests/asyncapi-2.0/External Documentation Object/valid.yaml
new file mode 100644
index 00000000..354ee72a
--- /dev/null
+++ b/tests/asyncapi-2.0/External Documentation Object/valid.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+externalDocs:
+ description: Find more info here
+ url: https://example.com
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/File Structure/common.yml b/tests/asyncapi-2.0/File Structure/common.yml
new file mode 100644
index 00000000..143af674
--- /dev/null
+++ b/tests/asyncapi-2.0/File Structure/common.yml
@@ -0,0 +1,6 @@
+userSignUp:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/File Structure/invalid-inexisting-file-ref.yaml b/tests/asyncapi-2.0/File Structure/invalid-inexisting-file-ref.yaml
new file mode 100644
index 00000000..5fd828a4
--- /dev/null
+++ b/tests/asyncapi-2.0/File Structure/invalid-inexisting-file-ref.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ $ref: inexistingFile.yml/#userSignUp
diff --git a/tests/asyncapi-2.0/File Structure/valid.yaml b/tests/asyncapi-2.0/File Structure/valid.yaml
new file mode 100644
index 00000000..1e741940
--- /dev/null
+++ b/tests/asyncapi-2.0/File Structure/valid.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ $ref: common.yml/#userSignUp
diff --git a/tests/asyncapi-2.0/Format/invalid-case-sensitive.yaml b/tests/asyncapi-2.0/Format/invalid-case-sensitive.yaml
new file mode 100644
index 00000000..f3e35d1d
--- /dev/null
+++ b/tests/asyncapi-2.0/Format/invalid-case-sensitive.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0.0
+
+INFO:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ SUBSCRIBE:
+ MESSAGE:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Format/invalid-json-schema-tag.yaml b/tests/asyncapi-2.0/Format/invalid-json-schema-tag.yaml
new file mode 100644
index 00000000..e291693e
--- /dev/null
+++ b/tests/asyncapi-2.0/Format/invalid-json-schema-tag.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: !!invalidTag 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Format/invalid-key.yaml b/tests/asyncapi-2.0/Format/invalid-key.yaml
new file mode 100644
index 00000000..daa4ef15
--- /dev/null
+++ b/tests/asyncapi-2.0/Format/invalid-key.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ $ref: '#/components/messages/1'
+
+components:
+ messages:
+ @#@#@#:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Format/invalid-syntax.yaml b/tests/asyncapi-2.0/Format/invalid-syntax.yaml
new file mode 100644
index 00000000..10caf301
--- /dev/null
+++ b/tests/asyncapi-2.0/Format/invalid-syntax.yaml
@@ -0,0 +1,4 @@
+qwe
+asd
+zxc
+123
diff --git a/tests/asyncapi-2.0/Format/valid.yaml b/tests/asyncapi-2.0/Format/valid.yaml
new file mode 100644
index 00000000..2daeb076
--- /dev/null
+++ b/tests/asyncapi-2.0/Format/valid.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Identifier/invalid-uri-format.yaml b/tests/asyncapi-2.0/Identifier/invalid-uri-format.yaml
new file mode 100644
index 00000000..efcc3651
--- /dev/null
+++ b/tests/asyncapi-2.0/Identifier/invalid-uri-format.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+id: 'this id does not conform to the URI format'
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Identifier/valid-uri.yaml b/tests/asyncapi-2.0/Identifier/valid-uri.yaml
new file mode 100644
index 00000000..c6a3b193
--- /dev/null
+++ b/tests/asyncapi-2.0/Identifier/valid-uri.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+id: 'https://github.com/smartylighting/streetlights-server'
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Identifier/valid-urn.yaml b/tests/asyncapi-2.0/Identifier/valid-urn.yaml
new file mode 100644
index 00000000..4c2128cd
--- /dev/null
+++ b/tests/asyncapi-2.0/Identifier/valid-urn.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+id: 'urn:com:smartylighting:streetlights:server'
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/Fields Types/invalid-contact-type.yaml b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-contact-type.yaml
new file mode 100644
index 00000000..d06ce429
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-contact-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ description: This is a sample server.
+ contact: 123
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..e93cc5f7
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ description:
+ prop: 1
+ termsOfService: http://asyncapi.org/terms/
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/Fields Types/invalid-license-type.yaml b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-license-type.yaml
new file mode 100644
index 00000000..b3f12db1
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-license-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ description: This is a sample server.
+ license: 123
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/Fields Types/invalid-termsOfService-type.yaml b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-termsOfService-type.yaml
new file mode 100644
index 00000000..b005f8da
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-termsOfService-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ description: This is a sample server.
+ termsOfService:
+ prop: 1
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/Fields Types/invalid-title-type.yaml b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-title-type.yaml
new file mode 100644
index 00000000..5f2550fe
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-title-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title:
+ prop: 1
+ version: 1.0.1
+ description: This is a sample server.
+ termsOfService: http://asyncapi.org/terms/
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/Fields Types/invalid-version-type.yaml b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-version-type.yaml
new file mode 100644
index 00000000..6455d576
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/Fields Types/invalid-version-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version:
+ prop: 1
+ description: This is a sample server.
+ termsOfService: http://asyncapi.org/terms/
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/invalid-missing-title.yaml b/tests/asyncapi-2.0/Info Object/invalid-missing-title.yaml
new file mode 100644
index 00000000..62bfdc2d
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/invalid-missing-title.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ version: 1.0.1
+ description: This is a sample server.
+ termsOfService: http://asyncapi.org/terms/
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/invalid-missing-version.yaml b/tests/asyncapi-2.0/Info Object/invalid-missing-version.yaml
new file mode 100644
index 00000000..9d507912
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/invalid-missing-version.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ description: This is a sample server.
+ termsOfService: http://asyncapi.org/terms/
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/invalid-termsofservice-url-format.yaml b/tests/asyncapi-2.0/Info Object/invalid-termsofservice-url-format.yaml
new file mode 100644
index 00000000..003235af
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/invalid-termsofservice-url-format.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ description: This is a sample server.
+ termsOfService: is not in the format of a URL
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Info Object/valid.yaml b/tests/asyncapi-2.0/Info Object/valid.yaml
new file mode 100644
index 00000000..51958bf9
--- /dev/null
+++ b/tests/asyncapi-2.0/Info Object/valid.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ description: This is a sample server.
+ termsOfService: http://asyncapi.org/terms/
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/License Object/Fields Types/invalid-name-type.yaml b/tests/asyncapi-2.0/License Object/Fields Types/invalid-name-type.yaml
new file mode 100644
index 00000000..61fb64c9
--- /dev/null
+++ b/tests/asyncapi-2.0/License Object/Fields Types/invalid-name-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ license:
+ name:
+ prop: 1
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/License Object/Fields Types/invalid-url-type.yaml b/tests/asyncapi-2.0/License Object/Fields Types/invalid-url-type.yaml
new file mode 100644
index 00000000..754a84b6
--- /dev/null
+++ b/tests/asyncapi-2.0/License Object/Fields Types/invalid-url-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ license:
+ name: Apache 2.0
+ url:
+ prop: 1
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/License Object/invalid-missing-name.yaml b/tests/asyncapi-2.0/License Object/invalid-missing-name.yaml
new file mode 100644
index 00000000..6d6728c2
--- /dev/null
+++ b/tests/asyncapi-2.0/License Object/invalid-missing-name.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ license:
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/License Object/invalid-url-format.yaml b/tests/asyncapi-2.0/License Object/invalid-url-format.yaml
new file mode 100644
index 00000000..20facabf
--- /dev/null
+++ b/tests/asyncapi-2.0/License Object/invalid-url-format.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ license:
+ name: Apache 2.0
+ url: this is not in the format of a URL
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/License Object/valid.yaml b/tests/asyncapi-2.0/License Object/valid.yaml
new file mode 100644
index 00000000..413cae2a
--- /dev/null
+++ b/tests/asyncapi-2.0/License Object/valid.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: AsyncAPI Sample App
+ version: 1.0.1
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..4f61df1b
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ contentEncoding: gzip
+ messageType: 'user.signup'
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-contentEncoding-type.yaml b/tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-contentEncoding-type.yaml
new file mode 100644
index 00000000..ac14dff9
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-contentEncoding-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ contentEncoding:
+ prop: 1
+ messageType: 'user.signup'
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-messageType-type.yaml b/tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-messageType-type.yaml
new file mode 100644
index 00000000..bcee1c98
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/amqp/Fields Types/invalid-messageType-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ contentEncoding: gzip
+ messageType:
+ prop: 1
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/amqp/invalid-extra-properties.yaml b/tests/asyncapi-2.0/Message Bindings Object/amqp/invalid-extra-properties.yaml
new file mode 100644
index 00000000..7bed1c3c
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/amqp/invalid-extra-properties.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ hello: 1
+ contentEncoding: gzip
+ messageType: 'user.signup'
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/amqp/valid.yaml b/tests/asyncapi-2.0/Message Bindings Object/amqp/valid.yaml
new file mode 100644
index 00000000..6d60c166
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/amqp/valid.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ contentEncoding: gzip
+ messageType: 'user.signup'
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/http/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Message Bindings Object/http/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..dc036314
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/http/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ headers:
+ type: object
+ properties:
+ Content-Type:
+ type: string
+ enum: ['application/json']
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Bindings Object/http/Fields Types/invalid-headers-type.yaml b/tests/asyncapi-2.0/Message Bindings Object/http/Fields Types/invalid-headers-type.yaml
new file mode 100644
index 00000000..9b92b4f7
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/http/Fields Types/invalid-headers-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ headers: 123
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/http/invalid-extra-properties.yaml b/tests/asyncapi-2.0/Message Bindings Object/http/invalid-extra-properties.yaml
new file mode 100644
index 00000000..b7858756
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/http/invalid-extra-properties.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ hello: 1
+ headers:
+ type: object
+ properties:
+ Content-Type:
+ type: string
+ enum: ['application/json']
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/http/invalid-headers-type.yaml b/tests/asyncapi-2.0/Message Bindings Object/http/invalid-headers-type.yaml
new file mode 100644
index 00000000..a88e6b70
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/http/invalid-headers-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ headers:
+ type: string
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/http/valid.yaml b/tests/asyncapi-2.0/Message Bindings Object/http/valid.yaml
new file mode 100644
index 00000000..382ed48f
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/http/valid.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ headers:
+ type: object
+ properties:
+ Content-Type:
+ type: string
+ enum: ['application/json']
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/kafka/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Message Bindings Object/kafka/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..ae1ed134
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/kafka/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ kafka:
+ key: myKey
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Bindings Object/kafka/Fields Types/invalid-key-type.yaml b/tests/asyncapi-2.0/Message Bindings Object/kafka/Fields Types/invalid-key-type.yaml
new file mode 100644
index 00000000..37b9ad37
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/kafka/Fields Types/invalid-key-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ kafka:
+ key:
+ prop: 1
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/kafka/invalid-extra-properties.yaml b/tests/asyncapi-2.0/Message Bindings Object/kafka/invalid-extra-properties.yaml
new file mode 100644
index 00000000..8ea06df1
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/kafka/invalid-extra-properties.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ kafka:
+ hello: 1
+ key: myKey
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/kafka/valid.yaml b/tests/asyncapi-2.0/Message Bindings Object/kafka/valid.yaml
new file mode 100644
index 00000000..b0f6b0c0
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/kafka/valid.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ kafka:
+ key:
+ type: string
+ enum: ['myKey']
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Message Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..1611b209
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ mqtt:
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Bindings Object/mqtt/invalid-extra-properties.yaml b/tests/asyncapi-2.0/Message Bindings Object/mqtt/invalid-extra-properties.yaml
new file mode 100644
index 00000000..0cc0aaf6
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/mqtt/invalid-extra-properties.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ mqtt:
+ hello: 1
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/mqtt/valid.yaml b/tests/asyncapi-2.0/Message Bindings Object/mqtt/valid.yaml
new file mode 100644
index 00000000..7783cb72
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/mqtt/valid.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ mqtt:
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Message Bindings Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Message Bindings Object/valid-empty-object.yaml
new file mode 100644
index 00000000..a6597c9a
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Bindings Object/valid-empty-object.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-bindings-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-bindings-type.yaml
new file mode 100644
index 00000000..23f8839c
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-bindings-type.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ bindings: 123
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-contentType-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-contentType-type.yaml
new file mode 100644
index 00000000..d32a2f05
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-contentType-type.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-correlationId-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-correlationId-type.yaml
new file mode 100644
index 00000000..6cd9c0ec
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-correlationId-type.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ correlationId: 123
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..4113db1a
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,13 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ description:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-examples-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-examples-type.yaml
new file mode 100644
index 00000000..da49e4e7
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-examples-type.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ examples: 123
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-externalDocs-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-externalDocs-type.yaml
new file mode 100644
index 00000000..74ed032c
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-externalDocs-type.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ externalDocs: 123
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-headers-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-headers-type.yaml
new file mode 100644
index 00000000..3ca8cec6
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-headers-type.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ headers: qwe
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-name-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-name-type.yaml
new file mode 100644
index 00000000..3aa86fca
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-name-type.yaml
@@ -0,0 +1,13 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ name:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-schemaFormat-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-schemaFormat-type.yaml
new file mode 100644
index 00000000..6ad4097e
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-schemaFormat-type.yaml
@@ -0,0 +1,13 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ schemaFormat:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-summary-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-summary-type.yaml
new file mode 100644
index 00000000..694711d5
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-summary-type.yaml
@@ -0,0 +1,13 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ summary:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-tags-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-tags-type.yaml
new file mode 100644
index 00000000..9c168e72
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-tags-type.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ tags: 123
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-title-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-title-type.yaml
new file mode 100644
index 00000000..44a943d8
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-title-type.yaml
@@ -0,0 +1,13 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ title:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Object/Fields Types/invalid-traits-type.yaml b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-traits-type.yaml
new file mode 100644
index 00000000..e5bb11af
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/Fields Types/invalid-traits-type.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ traits: 123
diff --git a/tests/asyncapi-2.0/Message Object/invalid-duplicate-tags.yaml b/tests/asyncapi-2.0/Message Object/invalid-duplicate-tags.yaml
new file mode 100644
index 00000000..b606c581
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/invalid-duplicate-tags.yaml
@@ -0,0 +1,15 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ tags:
+ - name: user
+ description: user signed up
+ - name: user
diff --git a/tests/asyncapi-2.0/Message Object/invalid-examples-item.yaml b/tests/asyncapi-2.0/Message Object/invalid-examples-item.yaml
new file mode 100644
index 00000000..00dceb6d
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/invalid-examples-item.yaml
@@ -0,0 +1,14 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ examples:
+ - one:
+ foobar: 123
diff --git a/tests/asyncapi-2.0/Message Object/invalid-headers-type.yaml b/tests/asyncapi-2.0/Message Object/invalid-headers-type.yaml
new file mode 100644
index 00000000..3895ad41
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/invalid-headers-type.yaml
@@ -0,0 +1,13 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ headers:
+ type: string
diff --git a/tests/asyncapi-2.0/Message Object/invalid-missing-contentType.yaml b/tests/asyncapi-2.0/Message Object/invalid-missing-contentType.yaml
new file mode 100644
index 00000000..79ae4cd0
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/invalid-missing-contentType.yaml
@@ -0,0 +1,10 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
diff --git a/tests/asyncapi-2.0/Message Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Message Object/valid-empty-object.yaml
new file mode 100644
index 00000000..79ae4cd0
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/valid-empty-object.yaml
@@ -0,0 +1,10 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
diff --git a/tests/asyncapi-2.0/Message Object/valid-internal-ref-correlationId.yaml b/tests/asyncapi-2.0/Message Object/valid-internal-ref-correlationId.yaml
new file mode 100644
index 00000000..e60e1b49
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/valid-internal-ref-correlationId.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ correlationId:
+ $ref: "#/components/correlationIds/userSignedUpCorId"
+
+components:
+ correlationIds:
+ userSignedUpCorId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
diff --git a/tests/asyncapi-2.0/Message Object/valid-internal-ref-header.yaml b/tests/asyncapi-2.0/Message Object/valid-internal-ref-header.yaml
new file mode 100644
index 00000000..dd5b73a8
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/valid-internal-ref-header.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ headers:
+ $ref: "#/components/schemas/userSignedUpHeaders"
+
+components:
+ schemas:
+ userSignedUpHeaders:
+ type: object
+ properties:
+ correlationId:
+ description: Correlation ID set by application
+ type: string
+ applicationInstanceId:
+ description: Unique identifier for a given instance of the publishing application
+ type: string
diff --git a/tests/asyncapi-2.0/Message Object/valid-using-defaultContentType.yaml b/tests/asyncapi-2.0/Message Object/valid-using-defaultContentType.yaml
new file mode 100644
index 00000000..2c15053b
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/valid-using-defaultContentType.yaml
@@ -0,0 +1,12 @@
+asyncapi: 2.0.0
+
+defaultContentType: application/json
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
diff --git a/tests/asyncapi-2.0/Message Object/valid.yaml b/tests/asyncapi-2.0/Message Object/valid.yaml
new file mode 100644
index 00000000..519652f2
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Object/valid.yaml
@@ -0,0 +1,49 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ summary: user signed up
+ description: user signed up to load some data
+ message:
+ name: UserSignup
+ title: User signup
+ summary: Action to sign a user up.
+ description: A longer description
+ contentType: application/json
+ schemaFormat: application/vnd.oai.openapi;version=3.0.0
+ correlationId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
+ headers:
+ type: object
+ properties:
+ correlationId:
+ description: Correlation ID set by application
+ type: string
+ applicationInstanceId:
+ description: Unique identifier for a given instance of the publishing application
+ type: string
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ examples:
+ - one:
+ email: hello@foo.bar
+ - two:
+ email: bye@foo.bar
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-bindings-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-bindings-type.yaml
new file mode 100644
index 00000000..686f2603
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-bindings-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ bindings: 123
+ contentType: application/json
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-contentType-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-contentType-type.yaml
new file mode 100644
index 00000000..64498c56
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-contentType-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-correlationId-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-correlationId-type.yaml
new file mode 100644
index 00000000..66ed5cf7
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-correlationId-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ correlationId: 123
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..f7ba2247
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ description:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-examples-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-examples-type.yaml
new file mode 100644
index 00000000..26bf3b45
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-examples-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ examples: 123
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-externalDocs-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-externalDocs-type.yaml
new file mode 100644
index 00000000..bc8c4dfb
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-externalDocs-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ externalDocs: 123
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-headers-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-headers-type.yaml
new file mode 100644
index 00000000..30e1da68
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-headers-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ headers: 123
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-schemaFormat-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-schemaFormat-type.yaml
new file mode 100644
index 00000000..0ed1e3c8
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-schemaFormat-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ schemaFormat:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-summary-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-summary-type.yaml
new file mode 100644
index 00000000..82c44ec4
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-summary-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ summary:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-tags-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-tags-type.yaml
new file mode 100644
index 00000000..1b64ec86
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-tags-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ tags: 123
diff --git a/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-title-type.yaml b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-title-type.yaml
new file mode 100644
index 00000000..f464bf6a
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/Fields Types/invalid-title-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ title:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Message Trait Object/invalid-defines-payload.yaml b/tests/asyncapi-2.0/Message Trait Object/invalid-defines-payload.yaml
new file mode 100644
index 00000000..fe9fc227
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/invalid-defines-payload.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ payload:
+ type: string
+ contentType: application/json
diff --git a/tests/asyncapi-2.0/Message Trait Object/invalid-defines-traits.yaml b/tests/asyncapi-2.0/Message Trait Object/invalid-defines-traits.yaml
new file mode 100644
index 00000000..85437945
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/invalid-defines-traits.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ traits:
+ - signedUpMessage
+ contentType: application/json
diff --git a/tests/asyncapi-2.0/Message Trait Object/invalid-duplicate-tags.yaml b/tests/asyncapi-2.0/Message Trait Object/invalid-duplicate-tags.yaml
new file mode 100644
index 00000000..a5b043b6
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/invalid-duplicate-tags.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ tags:
+ - name: user
+ description: user signed up
+ - name: user
+ contentType: application/json
diff --git a/tests/asyncapi-2.0/Message Trait Object/invalid-examples-item.yaml b/tests/asyncapi-2.0/Message Trait Object/invalid-examples-item.yaml
new file mode 100644
index 00000000..86ed64ba
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/invalid-examples-item.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ examples:
+ - one:
+ foobar: 123
diff --git a/tests/asyncapi-2.0/Message Trait Object/invalid-headers-type.yaml b/tests/asyncapi-2.0/Message Trait Object/invalid-headers-type.yaml
new file mode 100644
index 00000000..ee02fc49
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/invalid-headers-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ headers:
+ type: string
diff --git a/tests/asyncapi-2.0/Message Trait Object/invalid-missing-content-type.yaml b/tests/asyncapi-2.0/Message Trait Object/invalid-missing-content-type.yaml
new file mode 100644
index 00000000..fadcb1f7
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/invalid-missing-content-type.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
diff --git a/tests/asyncapi-2.0/Message Trait Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Message Trait Object/valid-empty-object.yaml
new file mode 100644
index 00000000..a63c9171
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/valid-empty-object.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ contentType: application/json
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
diff --git a/tests/asyncapi-2.0/Message Trait Object/valid-internal-ref-correlationId.yaml b/tests/asyncapi-2.0/Message Trait Object/valid-internal-ref-correlationId.yaml
new file mode 100644
index 00000000..9c73a0b4
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/valid-internal-ref-correlationId.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ correlationId:
+ $ref: "#/components/correlationIds/userSignedUpCorId"
+ correlationIds:
+ userSignedUpCorId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
diff --git a/tests/asyncapi-2.0/Message Trait Object/valid-internal-ref-header.yaml b/tests/asyncapi-2.0/Message Trait Object/valid-internal-ref-header.yaml
new file mode 100644
index 00000000..6a35b099
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/valid-internal-ref-header.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ contentType: application/json
+ headers:
+ $ref: "#/components/schemas/userSignedUpHeaders"
+ schemas:
+ userSignedUpHeaders:
+ type: object
+ properties:
+ correlationId:
+ description: Correlation ID set by application
+ type: string
+ applicationInstanceId:
+ description: Unique identifier for a given instance of the publishing application
+ type: string
diff --git a/tests/asyncapi-2.0/Message Trait Object/valid-using-defaultContentType.yaml b/tests/asyncapi-2.0/Message Trait Object/valid-using-defaultContentType.yaml
new file mode 100644
index 00000000..24c58081
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/valid-using-defaultContentType.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+defaultContentType: application/json
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
diff --git a/tests/asyncapi-2.0/Message Trait Object/valid.yaml b/tests/asyncapi-2.0/Message Trait Object/valid.yaml
new file mode 100644
index 00000000..4fcf02cf
--- /dev/null
+++ b/tests/asyncapi-2.0/Message Trait Object/valid.yaml
@@ -0,0 +1,55 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ summary: user signed up
+ description: user signed up to load some data
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/messageTraits/signedUpMessage"
+
+components:
+ messageTraits:
+ signedUpMessage:
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ name: UserSignup
+ title: User signup
+ summary: Action to sign a user up.
+ description: A longer description
+ contentType: application/json
+ schemaFormat: application/vnd.oai.openapi;version=3.0.0
+ correlationId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
+ headers:
+ type: object
+ properties:
+ correlationId:
+ description: Correlation ID set by application
+ type: string
+ applicationInstanceId:
+ description: Unique identifier for a given instance of the publishing application
+ type: string
+ examples:
+ - one:
+ email: hello@foo.bar
+ - two:
+ email: bye@foo.bar
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-ack-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-ack-type.yaml
new file mode 100644
index 00000000..0c10ceb0
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-ack-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: qwe
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-bcc-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-bcc-type.yaml
new file mode 100644
index 00000000..17ea7151
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-bcc-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: 123
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..807db2d1
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,30 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-cc-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-cc-type.yaml
new file mode 100644
index 00000000..dd78f673
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-cc-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: 123
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-deliveryMode-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-deliveryMode-type.yaml
new file mode 100644
index 00000000..9a014303
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-deliveryMode-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: qweqwe
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-expiration-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-expiration-type.yaml
new file mode 100644
index 00000000..d03d8fa5
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-expiration-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: qweqwe
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-mandatory-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-mandatory-type.yaml
new file mode 100644
index 00000000..8c221f47
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-mandatory-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: qwe
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-priority-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-priority-type.yaml
new file mode 100644
index 00000000..b16e6ab5
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-priority-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: qweqwe
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-replyTo-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-replyTo-type.yaml
new file mode 100644
index 00000000..8890280d
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-replyTo-type.yaml
@@ -0,0 +1,30 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo:
+ prop: 1
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-timestamp-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-timestamp-type.yaml
new file mode 100644
index 00000000..c00cef20
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-timestamp-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: qwe
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-userId-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-userId-type.yaml
new file mode 100644
index 00000000..d39e3260
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/Fields Types/invalid-userId-type.yaml
@@ -0,0 +1,30 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId:
+ prop: 1
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-deliveryMode-value.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-deliveryMode-value.yaml
new file mode 100644
index 00000000..4c002ace
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-deliveryMode-value.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 78
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-expiration-below-zero.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-expiration-below-zero.yaml
new file mode 100644
index 00000000..6502270b
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-expiration-below-zero.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: -90
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-extra-properties.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-extra-properties.yaml
new file mode 100644
index 00000000..6ddb22f4
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/invalid-extra-properties.yaml
@@ -0,0 +1,30 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ hello: 1
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/amqp/valid.yaml b/tests/asyncapi-2.0/Operation Bindings Object/amqp/valid.yaml
new file mode 100644
index 00000000..d8808a36
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/amqp/valid.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..17cac158
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ type: request
+ method: GET
+ query:
+ type: object
+ required:
+ - companyId
+ properties:
+ companyId:
+ type: number
+ minimum: 1
+ description: The Id of the company.
+ additionalProperties: false
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-method-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-method-type.yaml
new file mode 100644
index 00000000..d721b75c
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-method-type.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ type: request
+ method:
+ prop: 1
+ query:
+ type: object
+ required:
+ - companyId
+ properties:
+ companyId:
+ type: number
+ minimum: 1
+ description: The Id of the company.
+ additionalProperties: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-query-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-query-type.yaml
new file mode 100644
index 00000000..a180e84a
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-query-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ type: request
+ method: GET
+ query: qwe
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-type-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-type-type.yaml
new file mode 100644
index 00000000..d52bebd6
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/http/Fields Types/invalid-type-type.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ type:
+ prop: 1
+ method: GET
+ query:
+ type: object
+ required:
+ - companyId
+ properties:
+ companyId:
+ type: number
+ minimum: 1
+ description: The Id of the company.
+ additionalProperties: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-method-value.yaml b/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-method-value.yaml
new file mode 100644
index 00000000..cbeb1e3d
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-method-value.yaml
@@ -0,0 +1,31 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ type: request
+ method: invalidMethod
+ query:
+ type: object
+ required:
+ - companyId
+ properties:
+ companyId:
+ type: number
+ minimum: 1
+ description: The Id of the company.
+ additionalProperties: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-missing-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-missing-type.yaml
new file mode 100644
index 00000000..4c4c709a
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-missing-type.yaml
@@ -0,0 +1,30 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ method: GET
+ query:
+ type: object
+ required:
+ - companyId
+ properties:
+ companyId:
+ type: number
+ minimum: 1
+ description: The Id of the company.
+ additionalProperties: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-query-schema-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-query-schema-type.yaml
new file mode 100644
index 00000000..1e81bae2
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-query-schema-type.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ type: request
+ method: GET
+ query:
+ type: string
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-type-value.yaml b/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-type-value.yaml
new file mode 100644
index 00000000..ca2411e9
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/http/invalid-type-value.yaml
@@ -0,0 +1,31 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ type: invalidType
+ method: GET
+ query:
+ type: object
+ required:
+ - companyId
+ properties:
+ companyId:
+ type: number
+ minimum: 1
+ description: The Id of the company.
+ additionalProperties: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/http/valid.yaml b/tests/asyncapi-2.0/Operation Bindings Object/http/valid.yaml
new file mode 100644
index 00000000..986a4a4b
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/http/valid.yaml
@@ -0,0 +1,31 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ http:
+ type: request
+ method: GET
+ query:
+ type: object
+ required:
+ - companyId
+ properties:
+ companyId:
+ type: number
+ minimum: 1
+ description: The Id of the company.
+ additionalProperties: false
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..c2bea38b
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ kafka:
+ groupId: myGroupId
+ clientId: myClientId
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-clientId-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-clientId-type.yaml
new file mode 100644
index 00000000..fcb79d3a
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-clientId-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ kafka:
+ groupId: myGroupId
+ clientId:
+ prop: 1
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-groupId-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-groupId-type.yaml
new file mode 100644
index 00000000..95626ee4
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/kafka/Fields Types/invalid-groupId-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ kafka:
+ groupId:
+ prop: 1
+ clientId: myClientId
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/kafka/invalid-extra-properties.yaml b/tests/asyncapi-2.0/Operation Bindings Object/kafka/invalid-extra-properties.yaml
new file mode 100644
index 00000000..36f32c01
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/kafka/invalid-extra-properties.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ kafka:
+ groupId: myGroupId
+ clientId: myClientId
+ bindingVersion: '0.1.0'
+ hello: 1
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/kafka/valid.yaml b/tests/asyncapi-2.0/Operation Bindings Object/kafka/valid.yaml
new file mode 100644
index 00000000..40f0a130
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/kafka/valid.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ kafka:
+ groupId:
+ type: string
+ enum: ['myGroupId']
+ clientId:
+ type: string
+ enum: ['myClientId']
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..a8aaf9a0
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ mqtt:
+ qos: 2
+ retain: true
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-qos-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-qos-type.yaml
new file mode 100644
index 00000000..e52e64b1
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-qos-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ mqtt:
+ qos: qwe
+ retain: true
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-retain-type.yaml b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-retain-type.yaml
new file mode 100644
index 00000000..55053ec7
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/Fields Types/invalid-retain-type.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ mqtt:
+ qos: 2
+ retain: qwe
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/mqtt/invalid-extra-properties.yaml b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/invalid-extra-properties.yaml
new file mode 100644
index 00000000..46219c62
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/invalid-extra-properties.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ mqtt:
+ hello: 1
+ qos: 1
+ retain: true
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/mqtt/invalid-qos-value.yaml b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/invalid-qos-value.yaml
new file mode 100644
index 00000000..c9ff0de6
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/invalid-qos-value.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ mqtt:
+ qos: 124
+ retain: true
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/mqtt/valid.yaml b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/valid.yaml
new file mode 100644
index 00000000..cd6aa777
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/mqtt/valid.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ publish:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
+ mqtt:
+ qos: 2
+ retain: true
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Operation Bindings Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Operation Bindings Object/valid-empty-object.yaml
new file mode 100644
index 00000000..74f3a33d
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Bindings Object/valid-empty-object.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings:
diff --git a/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-bindings-type.yaml b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-bindings-type.yaml
new file mode 100644
index 00000000..6f9da05e
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-bindings-type.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ bindings: 123
diff --git a/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..7538dd59
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ description:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-externalDocs-type.yaml b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-externalDocs-type.yaml
new file mode 100644
index 00000000..40f25fe5
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-externalDocs-type.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ externalDocs: 123
diff --git a/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-message-type.yaml b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-message-type.yaml
new file mode 100644
index 00000000..c79cccc5
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-message-type.yaml
@@ -0,0 +1,10 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message: 123
diff --git a/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-operationId-type.yaml b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-operationId-type.yaml
new file mode 100644
index 00000000..193486d9
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-operationId-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId:
+ prop: 1
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-summary-type.yaml b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-summary-type.yaml
new file mode 100644
index 00000000..e92bc6f6
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-summary-type.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ summary:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-tags-type.yaml b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-tags-type.yaml
new file mode 100644
index 00000000..0162a24e
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-tags-type.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ tags: 123
diff --git a/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-traits-type.yaml b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-traits-type.yaml
new file mode 100644
index 00000000..9bae8e29
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/Fields Types/invalid-traits-type.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits: 123
diff --git a/tests/asyncapi-2.0/Operation Object/invalid-duplicate-operationId.yaml b/tests/asyncapi-2.0/Operation Object/invalid-duplicate-operationId.yaml
new file mode 100644
index 00000000..58868655
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/invalid-duplicate-operationId.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ publish:
+ operationId: userSignedUp
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Operation Object/invalid-duplicate-tags.yaml b/tests/asyncapi-2.0/Operation Object/invalid-duplicate-tags.yaml
new file mode 100644
index 00000000..a93e8381
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/invalid-duplicate-tags.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ summary: user signed up
+ description: user signed up to load some data
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ tags:
+ - name: user
+ description: user signed up
+ - name: user
diff --git a/tests/asyncapi-2.0/Operation Object/valid-bare-minimum.yaml b/tests/asyncapi-2.0/Operation Object/valid-bare-minimum.yaml
new file mode 100644
index 00000000..2daeb076
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/valid-bare-minimum.yaml
@@ -0,0 +1,16 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Operation Object/valid-case-sensitive-operationId.yaml b/tests/asyncapi-2.0/Operation Object/valid-case-sensitive-operationId.yaml
new file mode 100644
index 00000000..4ee367a0
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/valid-case-sensitive-operationId.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ publish:
+ operationId: USERSIGNEDUP
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Operation Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Operation Object/valid-empty-object.yaml
new file mode 100644
index 00000000..059133b6
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/valid-empty-object.yaml
@@ -0,0 +1,9 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
diff --git a/tests/asyncapi-2.0/Operation Object/valid-multiple-messages.yaml b/tests/asyncapi-2.0/Operation Object/valid-multiple-messages.yaml
new file mode 100644
index 00000000..481ba9b5
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/valid-multiple-messages.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ oneOf:
+ - $ref: '#/components/messages/signup'
+ - $ref: '#/components/messages/login'
+
+components:
+ messages:
+ signup:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ login:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Operation Object/valid.yaml b/tests/asyncapi-2.0/Operation Object/valid.yaml
new file mode 100644
index 00000000..2b7e902f
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Object/valid.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ operationId: userSignedUp
+ summary: user signed up
+ description: user signed up to load some data
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
diff --git a/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-bindings-type.yaml b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-bindings-type.yaml
new file mode 100644
index 00000000..7d96d77d
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-bindings-type.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ - $ref: "#/components/operationTraits/userSignedUpDescTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ operationId: userSignedUp
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ summary: hello
+ userSignedUpDescTrait:
+ description: user signed up to load some data
+ bindings: 123
diff --git a/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..b00af5b0
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ - $ref: "#/components/operationTraits/userSignedUpDescTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ operationId: userSignedUp
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ summary: user signed up
+ userSignedUpDescTrait:
+ description:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-externalDocs-type.yaml b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-externalDocs-type.yaml
new file mode 100644
index 00000000..7ae54dd7
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-externalDocs-type.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ - $ref: "#/components/operationTraits/userSignedUpDescTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ operationId: userSignedUp
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs: 123
+ summary: hello
+ userSignedUpDescTrait:
+ description: user signed up to load some data
diff --git a/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-operationId-type.yaml b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-operationId-type.yaml
new file mode 100644
index 00000000..f6d37eab
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-operationId-type.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ - $ref: "#/components/operationTraits/userSignedUpDescTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ operationId:
+ prop: 1
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ summary: user signed up
+ userSignedUpDescTrait:
+ description: user signed up to load some data
diff --git a/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-summary-type.yaml b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-summary-type.yaml
new file mode 100644
index 00000000..d3ffbc32
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-summary-type.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ - $ref: "#/components/operationTraits/userSignedUpDescTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ operationId: userSignedUp
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ summary:
+ prop: 1
+ userSignedUpDescTrait:
+ description: user signed up to load some data
diff --git a/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-tags-type.yaml b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-tags-type.yaml
new file mode 100644
index 00000000..9ade788e
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/Fields Types/invalid-tags-type.yaml
@@ -0,0 +1,31 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ - $ref: "#/components/operationTraits/userSignedUpDescTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ operationId: userSignedUp
+ tags: 123
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ summary: hello
+ userSignedUpDescTrait:
+ description: user signed up to load some data
diff --git a/tests/asyncapi-2.0/Operation Trait Object/invalid-duplicate-operationId.yaml b/tests/asyncapi-2.0/Operation Trait Object/invalid-duplicate-operationId.yaml
new file mode 100644
index 00000000..19b57b4a
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/invalid-duplicate-operationId.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ publish:
+ operationId: userSignedUp
+ message:
+ payload:
+ type: string
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ operationId: userSignedUp
diff --git a/tests/asyncapi-2.0/Operation Trait Object/invalid-duplicate-tags.yaml b/tests/asyncapi-2.0/Operation Trait Object/invalid-duplicate-tags.yaml
new file mode 100644
index 00000000..f0f1c547
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/invalid-duplicate-tags.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ - $ref: "#/components/operationTraits/userSignedUpDescTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ tags:
+ - name: user
+ description: user signed up
+ - name: user
+ userSignedUpDescTrait:
diff --git a/tests/asyncapi-2.0/Operation Trait Object/invalid-trait-with-message.yaml b/tests/asyncapi-2.0/Operation Trait Object/invalid-trait-with-message.yaml
new file mode 100644
index 00000000..8e30216f
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/invalid-trait-with-message.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Operation Trait Object/invalid-trait-with-traits.yaml b/tests/asyncapi-2.0/Operation Trait Object/invalid-trait-with-traits.yaml
new file mode 100644
index 00000000..45ce77d7
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/invalid-trait-with-traits.yaml
@@ -0,0 +1,24 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
diff --git a/tests/asyncapi-2.0/Operation Trait Object/valid-case-sensetive-operationId.yaml b/tests/asyncapi-2.0/Operation Trait Object/valid-case-sensetive-operationId.yaml
new file mode 100644
index 00000000..4061981a
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/valid-case-sensetive-operationId.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ publish:
+ operationId: userSignedUp
+ message:
+ payload:
+ type: string
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ operationId: USERSIGNEDUP
+ summary: user signed up
diff --git a/tests/asyncapi-2.0/Operation Trait Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Operation Trait Object/valid-empty-object.yaml
new file mode 100644
index 00000000..951928b7
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/valid-empty-object.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ - $ref: "#/components/operationTraits/userSignedUpDescTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
diff --git a/tests/asyncapi-2.0/Operation Trait Object/valid-empty-trait.yaml b/tests/asyncapi-2.0/Operation Trait Object/valid-empty-trait.yaml
new file mode 100644
index 00000000..26008bc2
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/valid-empty-trait.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
diff --git a/tests/asyncapi-2.0/Operation Trait Object/valid.yaml b/tests/asyncapi-2.0/Operation Trait Object/valid.yaml
new file mode 100644
index 00000000..a63da1eb
--- /dev/null
+++ b/tests/asyncapi-2.0/Operation Trait Object/valid.yaml
@@ -0,0 +1,34 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ traits:
+ - $ref: "#/components/operationTraits/userSignedUpTrait"
+ - $ref: "#/components/operationTraits/userSignedUpDescTrait"
+
+components:
+ operationTraits:
+ userSignedUpTrait:
+ operationId: userSignedUp
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ summary: user signed up
+ userSignedUpDescTrait:
+ description: user signed up to load some data
diff --git a/tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..f9690aeb
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ description:
+ prop: 1
+ schema:
+ type: string
+ location: $message.payload#/user/id
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-location-type.yaml b/tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-location-type.yaml
new file mode 100644
index 00000000..3ccb0124
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-location-type.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ description: Id of the user.
+ schema:
+ type: string
+ location:
+ prop: 1
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-schema-type.yaml b/tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-schema-type.yaml
new file mode 100644
index 00000000..19b512ac
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameter Object/Fields Types/invalid-schema-type.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ description: Id of the user.
+ schema: 123
+ location: $message.payload#/user/id
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameter Object/invalid-runtime-expression.yaml b/tests/asyncapi-2.0/Parameter Object/invalid-runtime-expression.yaml
new file mode 100644
index 00000000..8682b1cb
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameter Object/invalid-runtime-expression.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ description: Id of the user.
+ schema:
+ type: string
+ location: somewhere else
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameter Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Parameter Object/valid-empty-object.yaml
new file mode 100644
index 00000000..eb7eadba
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameter Object/valid-empty-object.yaml
@@ -0,0 +1,14 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameter Object/valid-extra-parameter.yaml b/tests/asyncapi-2.0/Parameter Object/valid-extra-parameter.yaml
new file mode 100644
index 00000000..5066d068
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameter Object/valid-extra-parameter.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ description: Id of the user.
+ schema:
+ type: string
+ location: $message.payload#/user/id
+ userToken:
+ schema:
+ type: string
+ location: $message.payload#/user/token
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameter Object/valid-parameter-not-defined.yaml b/tests/asyncapi-2.0/Parameter Object/valid-parameter-not-defined.yaml
new file mode 100644
index 00000000..9767361e
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameter Object/valid-parameter-not-defined.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/{userToken}/signup:
+ parameters:
+ userId:
+ description: Id of the user.
+ schema:
+ type: string
+ location: $message.payload#/user/id
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameter Object/valid-ref-schema.yaml b/tests/asyncapi-2.0/Parameter Object/valid-ref-schema.yaml
new file mode 100644
index 00000000..c8f8ebc7
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameter Object/valid-ref-schema.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ description: Id of the user.
+ schema:
+ $ref: "#/components/schemas/defaultString"
+ location: $message.payload#/user/id
+ publish:
+ message:
+ payload:
+ type: string
+
+components:
+ schemas:
+ defaultString:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameter Object/valid.yaml b/tests/asyncapi-2.0/Parameter Object/valid.yaml
new file mode 100644
index 00000000..7bfaf19f
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameter Object/valid.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ description: Id of the user.
+ schema:
+ type: string
+ location: $message.payload#/user/id
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameters Object/Fields Types/invalid-parameter-type.yaml b/tests/asyncapi-2.0/Parameters Object/Fields Types/invalid-parameter-type.yaml
new file mode 100644
index 00000000..85491b68
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameters Object/Fields Types/invalid-parameter-type.yaml
@@ -0,0 +1,13 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters: 123
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameters Object/invalid-pattern-field.yaml b/tests/asyncapi-2.0/Parameters Object/invalid-pattern-field.yaml
new file mode 100644
index 00000000..6deadf86
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameters Object/invalid-pattern-field.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ schema:
+ type: string
+ $!@$%#!@$:
+ schema:
+ type: string
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameters Object/valid-internal-ref.yaml b/tests/asyncapi-2.0/Parameters Object/valid-internal-ref.yaml
new file mode 100644
index 00000000..5f980dfd
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameters Object/valid-internal-ref.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ $ref: "#/components/parameters/userId"
+ publish:
+ message:
+ payload:
+ type: string
+
+components:
+ parameters:
+ userId:
+ description: Id of the user.
+ schema:
+ type: string
diff --git a/tests/asyncapi-2.0/Parameters Object/valid.yaml b/tests/asyncapi-2.0/Parameters Object/valid.yaml
new file mode 100644
index 00000000..17a3e9e9
--- /dev/null
+++ b/tests/asyncapi-2.0/Parameters Object/valid.yaml
@@ -0,0 +1,17 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ user/{userId}/signup:
+ parameters:
+ userId:
+ description: Id of the user.
+ schema:
+ type: string
+ publish:
+ message:
+ payload:
+ type: string
diff --git a/tests/asyncapi-2.0/Reference Object/Fields Types/invalid-ref-type.yaml b/tests/asyncapi-2.0/Reference Object/Fields Types/invalid-ref-type.yaml
new file mode 100644
index 00000000..f19e120f
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/Fields Types/invalid-ref-type.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ messages:
+ myMessage:
+ $ref:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Reference Object/lib.yml b/tests/asyncapi-2.0/Reference Object/lib.yml
new file mode 100644
index 00000000..31e761bc
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/lib.yml
@@ -0,0 +1,131 @@
+mySchema:
+ type: object
+ properties:
+ correlationId:
+ description: Correlation ID set by application
+ type: string
+ applicationInstanceId:
+ description: Unique identifier
+ type: string
+
+myMessage:
+ name: UserSignup
+ title: User signup
+ summary: Action to sign a user up.
+ description: A longer description
+ contentType: application/json
+ schemaFormat: application/vnd.oai.openapi;version=3.0.0
+ correlationId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
+ headers:
+ type: object
+ properties:
+ correlationId:
+ description: Correlation ID set by application
+ type: string
+ applicationInstanceId:
+ description: Unique identifier
+ type: string
+ tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+ examples:
+ - one:
+ email: hello@foo.bar
+ - two:
+ email: bye@foo.bar
+
+mySecurityScheme:
+ type: httpApiKey
+ name: Api-Key
+ in: header
+
+myParam:
+ description: Id of the user.
+ schema:
+ type: string
+ location: $message.payload#/user/id
+
+myCorrelationId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
+
+myOperationTrait:
+ description: user signed up to load some data
+
+myMessageTrait:
+ name: UserSignup
+ title: User signup
+ summary: Action to sign a user up.
+ description: A longer description
+ contentType: application/json
+ schemaFormat: application/vnd.oai.openapi;version=3.0.0
+ correlationId:
+ description: Default Correlation ID
+ location: $message.header#/correlationId
+ headers:
+ type: object
+ properties:
+ applicationInstanceId:
+ description: Unique identifier
+ type: string
+
+myServerBindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 2
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
+
+myChannelBindings:
+ amqp:
+ is: routingKey
+ queue:
+ name: my-queue-name
+ durable: true
+ exclusive: true
+ autoDelete: false
+ vhost: /
+ exchange:
+ name: myExchange
+ type: topic
+ durable: true
+ autoDelete: false
+ vhost: /
+ bindingVersion: '0.1.0'
+
+myOperationBindings:
+ amqp:
+ expiration: 100000
+ userId: guest
+ cc: ['user.logs']
+ priority: 10
+ deliveryMode: 2
+ mandatory: false
+ bcc: ['external.audit']
+ replyTo: user.signedup
+ timestamp: true
+ ack: false
+ bindingVersion: '0.1.0'
+
+myMessageBindings:
+ amqp:
+ contentEncoding: gzip
+ messageType: 'user.signup'
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-channelBindings.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-channelBindings.yaml
new file mode 100644
index 00000000..07cadf9d
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-channelBindings.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ channelBindings:
+ myChannelBindings:
+ $ref: "lib.yml#/myChannelBindings"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-correlationId.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-correlationId.yaml
new file mode 100644
index 00000000..1eba2d29
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-correlationId.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ correlationIds:
+ myCorrelationId:
+ $ref: "lib.yml#/myCorrelationId"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-message.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-message.yaml
new file mode 100644
index 00000000..80981156
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-message.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ messages:
+ myMessage:
+ $ref: "lib.yml#/myMessage"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-messageBindings.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-messageBindings.yaml
new file mode 100644
index 00000000..d0de7af3
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-messageBindings.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ messageBindings:
+ myMessageBindings:
+ $ref: "lib.yml#/myMessageBindings"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-messageTraits.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-messageTraits.yaml
new file mode 100644
index 00000000..3ff7741f
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-messageTraits.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ messageTraits:
+ myMessageTrait:
+ $ref: "lib.yml#/myMessageTrait"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-operationBindings.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-operationBindings.yaml
new file mode 100644
index 00000000..fd53e969
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-operationBindings.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ operationBindings:
+ myOperationBindings:
+ $ref: "lib.yml#/myOperationBindings"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-operationTraits.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-operationTraits.yaml
new file mode 100644
index 00000000..5a086ec3
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-operationTraits.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ operationTraits:
+ myOperationTrait:
+ $ref: "lib.yml#/myOperationTrait"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-parameter.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-parameter.yaml
new file mode 100644
index 00000000..3d76d9ce
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-parameter.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ parameters:
+ myParam:
+ $ref: "lib.yml#/myParam"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-schema.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-schema.yaml
new file mode 100644
index 00000000..4e038875
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-schema.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ schemas:
+ mySchema:
+ $ref: "lib.yml#/mySchema"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-securityScheme.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-securityScheme.yaml
new file mode 100644
index 00000000..84ef959b
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-securityScheme.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ securitySchemes:
+ simple:
+ $ref: "lib.yml#/mySecurityScheme"
diff --git a/tests/asyncapi-2.0/Reference Object/valid-external-ref-serverBindings.yaml b/tests/asyncapi-2.0/Reference Object/valid-external-ref-serverBindings.yaml
new file mode 100644
index 00000000..878ca7d0
--- /dev/null
+++ b/tests/asyncapi-2.0/Reference Object/valid-external-ref-serverBindings.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+components:
+ serverBindings:
+ myServerBindings:
+ $ref: "lib.yml#/myServerBindings"
diff --git a/tests/asyncapi-2.0/Schema Object/invalid-polymorphism-missing-discriminator.yaml b/tests/asyncapi-2.0/Schema Object/invalid-polymorphism-missing-discriminator.yaml
new file mode 100644
index 00000000..9cf372fa
--- /dev/null
+++ b/tests/asyncapi-2.0/Schema Object/invalid-polymorphism-missing-discriminator.yaml
@@ -0,0 +1,66 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ $ref: "#/components/schemas/Pet"
+
+components:
+ schemas:
+ Pet:
+ type: object
+ properties:
+ name:
+ type: string
+ petType:
+ type: string
+ required:
+ - name
+ - petType
+ Cat:
+ description: A representation of a cat
+ allOf:
+ - $ref: '#/components/schemas/Pet'
+ - type: object
+ properties:
+ huntingSkill:
+ type: string
+ description: The measured skill for hunting
+ enum:
+ - clueless
+ - lazy
+ - adventurous
+ - aggressive
+ required:
+ - huntingSkill
+ Dog:
+ description: A representation of a dog
+ allOf:
+ - $ref: '#/components/schemas/Pet'
+ - type: object
+ properties:
+ packSize:
+ type: integer
+ format: int32
+ description: the size of the pack the dog is from
+ minimum: 0
+ required:
+ - packSize
+ StickInsect:
+ description: A representation of an Australian walking stick
+ allOf:
+ - $ref: '#/components/schemas/Pet'
+ - type: object
+ properties:
+ petType:
+ const: StickBug
+ color:
+ type: string
+ required:
+ - color
diff --git a/tests/asyncapi-2.0/Schema Object/valid-composition.yaml b/tests/asyncapi-2.0/Schema Object/valid-composition.yaml
new file mode 100644
index 00000000..bbb1836f
--- /dev/null
+++ b/tests/asyncapi-2.0/Schema Object/valid-composition.yaml
@@ -0,0 +1,36 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ $ref: "#/components/schemas/ErrorModel"
+
+components:
+ schemas:
+ ErrorModel:
+ type: object
+ required:
+ - message
+ - code
+ properties:
+ message:
+ type: string
+ code:
+ type: integer
+ minimum: 100
+ maximum: 600
+ ExtendedErrorModel:
+ allOf:
+ - $ref: '#/components/schemas/ErrorModel'
+ - type: object
+ required:
+ - rootCause
+ properties:
+ rootCause:
+ type: string
diff --git a/tests/asyncapi-2.0/Schema Object/valid-polymorphism.yaml b/tests/asyncapi-2.0/Schema Object/valid-polymorphism.yaml
new file mode 100644
index 00000000..6f3f1014
--- /dev/null
+++ b/tests/asyncapi-2.0/Schema Object/valid-polymorphism.yaml
@@ -0,0 +1,67 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ $ref: "#/components/schemas/Pet"
+
+components:
+ schemas:
+ Pet:
+ type: object
+ discriminator: petType
+ properties:
+ name:
+ type: string
+ petType:
+ type: string
+ required:
+ - name
+ - petType
+ Cat:
+ description: A representation of a cat
+ allOf:
+ - $ref: '#/components/schemas/Pet'
+ - type: object
+ properties:
+ huntingSkill:
+ type: string
+ description: The measured skill for hunting
+ enum:
+ - clueless
+ - lazy
+ - adventurous
+ - aggressive
+ required:
+ - huntingSkill
+ Dog:
+ description: A representation of a dog
+ allOf:
+ - $ref: '#/components/schemas/Pet'
+ - type: object
+ properties:
+ packSize:
+ type: integer
+ format: int32
+ description: the size of the pack the dog is from
+ minimum: 0
+ required:
+ - packSize
+ StickInsect:
+ description: A representation of an Australian walking stick
+ allOf:
+ - $ref: '#/components/schemas/Pet'
+ - type: object
+ properties:
+ petType:
+ const: StickBug
+ color:
+ type: string
+ required:
+ - color
diff --git a/tests/asyncapi-2.0/Schema Object/valid.yaml b/tests/asyncapi-2.0/Schema Object/valid.yaml
new file mode 100644
index 00000000..ce6f1ff8
--- /dev/null
+++ b/tests/asyncapi-2.0/Schema Object/valid.yaml
@@ -0,0 +1,101 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ $ref: "#/components/schemas/Main"
+
+components:
+ schemas:
+ Main:
+ type: object
+ description: hi
+ propertyNames:
+ type: string
+ minLength: 1
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ deprecated: true
+ additionalProperties: true
+ maxProperties: 99
+ minProperties: 1
+ required:
+ - stringProp
+ properties:
+ objectProp:
+ readOnly: true
+ type: object
+ patternProperties:
+ ^[a-zA-Z0-9\.\-_]+$:
+ type: number
+ arrayProp:
+ contains:
+ type: number
+ writeOnly: true
+ type: array
+ minItems: 1
+ maxItems: 99
+ uniqueItems: false
+ additionalItems: true
+ items:
+ type: integer
+ default: 3
+ format: int32
+ multipleOf: 1
+ maximum: 99
+ exclusiveMaximum: true
+ minimum: 1
+ exclusiveMinimum: true
+ anotherString:
+ type: string
+ const: hello
+ oneOfProp:
+ oneOf:
+ - type: string
+ - type: number
+ allOfProp:
+ allOf:
+ - type: string
+ - type: number
+ notProp:
+ allOf:
+ - type: string
+ - not:
+ type: number
+ stringProp:
+ type: string
+ title: String property
+ minLength: 1
+ maxLength: 10
+ pattern: '^[a-zA-Z0-9\.\-_]+$'
+ enum:
+ - John
+ - Doe
+ examples:
+ - John
+ ifthenelseObj:
+ type: object
+ properties:
+ country:
+ type: string
+ street_address:
+ type: string
+ if:
+ properties:
+ country:
+ const: United States of America
+ then:
+ properties:
+ postal_code:
+ pattern: '[0-9]{5}(-[0-9]{4})?'
+ else:
+ properties:
+ postal_code:
+ pattern: '[A-Z][0-9][A-Z] [0-9][A-Z][0-9]'
diff --git a/tests/asyncapi-2.0/Security Requirement Object/Fields Types/invalid-name-type.yaml b/tests/asyncapi-2.0/Security Requirement Object/Fields Types/invalid-name-type.yaml
new file mode 100644
index 00000000..01e771d7
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/Fields Types/invalid-name-type.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: not an array
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: http
+ scheme: bearer
+ bearerFormat: a hint
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-X509-non-empty-array.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-X509-non-empty-array.yaml
new file mode 100644
index 00000000..476788d1
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-X509-non-empty-array.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - hello
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: X509
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-apiKey-non-empty-array.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-apiKey-non-empty-array.yaml
new file mode 100644
index 00000000..f986fcb7
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-apiKey-non-empty-array.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - hello
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: apiKey
+ in: user
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-asymmetricEncryption-non-empty-array.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-asymmetricEncryption-non-empty-array.yaml
new file mode 100644
index 00000000..577a5f8c
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-asymmetricEncryption-non-empty-array.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - hello
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: asymmetricEncryption
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-http-non-empty-array.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-http-non-empty-array.yaml
new file mode 100644
index 00000000..524a2312
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-http-non-empty-array.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - hello
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: http
+ scheme: bearer
+ bearerFormat: a hint
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-httpApiKey-non-empty-array.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-httpApiKey-non-empty-array.yaml
new file mode 100644
index 00000000..6c104db7
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-httpApiKey-non-empty-array.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - hello
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: httpApiKey
+ name: "My-Key-Header"
+ in: header
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-inexisting-scheme.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-inexisting-scheme.yaml
new file mode 100644
index 00000000..f8b64e9b
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-inexisting-scheme.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - foobar: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: openIdConnect
+ openIdConnectUrl: http://foo.com
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-oauth2-without-scopes.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-oauth2-without-scopes.yaml
new file mode 100644
index 00000000..de25e2ae
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-oauth2-without-scopes.yaml
@@ -0,0 +1,31 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ implicit:
+ authorizationUrl: https://example.com/api/oauth/auth
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-openIdConnect-without-scopes.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-openIdConnect-without-scopes.yaml
new file mode 100644
index 00000000..72c7f5c3
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-openIdConnect-without-scopes.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: openIdConnect
+ openIdConnectUrl: http://foo.com
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-symmetricEncryption-non-empty-array.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-symmetricEncryption-non-empty-array.yaml
new file mode 100644
index 00000000..d7f22e45
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-symmetricEncryption-non-empty-array.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - hello
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: symmetricEncryption
diff --git a/tests/asyncapi-2.0/Security Requirement Object/invalid-userPassword-non-empty-array.yaml b/tests/asyncapi-2.0/Security Requirement Object/invalid-userPassword-non-empty-array.yaml
new file mode 100644
index 00000000..4abf4459
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Requirement Object/invalid-userPassword-non-empty-array.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - hello
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: userPassword
diff --git a/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-bearerFormat-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-bearerFormat-type.yaml
new file mode 100644
index 00000000..d46b5898
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-bearerFormat-type.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: http
+ scheme: bearer
+ bearerFormat:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..ea4af67a
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: http
+ description:
+ prop: 1
+ scheme: bearer
+ bearerFormat: a hint
diff --git a/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-flows-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-flows-type.yaml
new file mode 100644
index 00000000..7e177046
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-flows-type.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows: 123
diff --git a/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-in-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-in-type.yaml
new file mode 100644
index 00000000..004941de
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-in-type.yaml
@@ -0,0 +1,37 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+ - secondarySecurity: []
+ - thirdSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: httpApiKey
+ name: "My-Key-Header"
+ in:
+ prop: 1
+ secondarySecurity:
+ type: httpApiKey
+ name: "My-Key-Cookie"
+ in: cookie
+ thirdSecurity:
+ type: httpApiKey
+ name: "My-Key-Query"
+ in: query
diff --git a/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-name-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-name-type.yaml
new file mode 100644
index 00000000..b067134a
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-name-type.yaml
@@ -0,0 +1,37 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+ - secondarySecurity: []
+ - thirdSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: httpApiKey
+ name:
+ prop: 1
+ in: header
+ secondarySecurity:
+ type: httpApiKey
+ name: "My-Key-Cookie"
+ in: cookie
+ thirdSecurity:
+ type: httpApiKey
+ name: "My-Key-Query"
+ in: query
diff --git a/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-openIdConnectUrl-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-openIdConnectUrl-type.yaml
new file mode 100644
index 00000000..05039f87
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-openIdConnectUrl-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: openIdConnect
+ openIdConnectUrl:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-scheme-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-scheme-type.yaml
new file mode 100644
index 00000000..5c8d1f78
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-scheme-type.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: http
+ scheme:
+ prop: 1
+ bearerFormat: a hint
diff --git a/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-type-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-type-type.yaml
new file mode 100644
index 00000000..17ae3e06
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/Fields Types/invalid-type-type.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type:
+ prop: 1
+ scheme: bearer
+ bearerFormat: a hint
diff --git a/tests/asyncapi-2.0/Security Scheme Object/X509/valid.yaml b/tests/asyncapi-2.0/Security Scheme Object/X509/valid.yaml
new file mode 100644
index 00000000..391c4859
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/X509/valid.yaml
@@ -0,0 +1,24 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: X509
diff --git a/tests/asyncapi-2.0/Security Scheme Object/apiKey/invalid-in-value.yaml b/tests/asyncapi-2.0/Security Scheme Object/apiKey/invalid-in-value.yaml
new file mode 100644
index 00000000..4ef5396c
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/apiKey/invalid-in-value.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+ - secondarySecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: apiKey
+ in: user
+ secondarySecurity:
+ type: apiKey
+ in: invalidValue
diff --git a/tests/asyncapi-2.0/Security Scheme Object/apiKey/invalid-missing-in-property.yaml b/tests/asyncapi-2.0/Security Scheme Object/apiKey/invalid-missing-in-property.yaml
new file mode 100644
index 00000000..9cc53859
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/apiKey/invalid-missing-in-property.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+ - secondarySecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: apiKey
+ in: user
+ secondarySecurity:
+ type: apiKey
diff --git a/tests/asyncapi-2.0/Security Scheme Object/apiKey/valid.yaml b/tests/asyncapi-2.0/Security Scheme Object/apiKey/valid.yaml
new file mode 100644
index 00000000..34dd0c7a
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/apiKey/valid.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+ - secondarySecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: apiKey
+ in: user
+ secondarySecurity:
+ type: apiKey
+ in: password
diff --git a/tests/asyncapi-2.0/Security Scheme Object/asymmetricEncryption/valid.yaml b/tests/asyncapi-2.0/Security Scheme Object/asymmetricEncryption/valid.yaml
new file mode 100644
index 00000000..fb046bbf
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/asymmetricEncryption/valid.yaml
@@ -0,0 +1,24 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: asymmetricEncryption
diff --git a/tests/asyncapi-2.0/Security Scheme Object/http/invalid-missing-scheme.yaml b/tests/asyncapi-2.0/Security Scheme Object/http/invalid-missing-scheme.yaml
new file mode 100644
index 00000000..a2b1903e
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/http/invalid-missing-scheme.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: http
+ bearerFormat: a hint
diff --git a/tests/asyncapi-2.0/Security Scheme Object/http/valid.yaml b/tests/asyncapi-2.0/Security Scheme Object/http/valid.yaml
new file mode 100644
index 00000000..d760a5d5
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/http/valid.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: http
+ scheme: bearer
+ bearerFormat: a hint
diff --git a/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-in-value.yaml b/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-in-value.yaml
new file mode 100644
index 00000000..9b43dd50
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-in-value.yaml
@@ -0,0 +1,36 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+ - secondarySecurity: []
+ - thirdSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: httpApiKey
+ name: "My-Key-Header"
+ in: header
+ secondarySecurity:
+ type: httpApiKey
+ name: "My-Key-Cookie"
+ in: cookie
+ thirdSecurity:
+ type: httpApiKey
+ name: "My-Key-Query"
+ in: invalidValue
diff --git a/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-missing-in-property.yaml b/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-missing-in-property.yaml
new file mode 100644
index 00000000..62880d03
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-missing-in-property.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+ - secondarySecurity: []
+ - thirdSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: httpApiKey
+ name: "My-Key-Header"
+ in: header
+ secondarySecurity:
+ type: httpApiKey
+ name: "My-Key-Cookie"
+ in: cookie
+ thirdSecurity:
+ type: httpApiKey
+ name: "My-Key-Query"
diff --git a/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-missing-name.yaml b/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-missing-name.yaml
new file mode 100644
index 00000000..125120aa
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/invalid-missing-name.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+ - secondarySecurity: []
+ - thirdSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: httpApiKey
+ name: "My-Key-Header"
+ in: header
+ secondarySecurity:
+ type: httpApiKey
+ name: "My-Key-Cookie"
+ in: cookie
+ thirdSecurity:
+ type: httpApiKey
+ in: query
diff --git a/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/valid.yaml b/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/valid.yaml
new file mode 100644
index 00000000..a9541116
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/httpApiKey/valid.yaml
@@ -0,0 +1,36 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+ - secondarySecurity: []
+ - thirdSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: httpApiKey
+ name: "My-Key-Header"
+ in: header
+ secondarySecurity:
+ type: httpApiKey
+ name: "My-Key-Cookie"
+ in: cookie
+ thirdSecurity:
+ type: httpApiKey
+ name: "My-Key-Query"
+ in: query
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-authorizationCode-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-authorizationCode-type.yaml
new file mode 100644
index 00000000..2d3a61d8
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-authorizationCode-type.yaml
@@ -0,0 +1,46 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ implicit:
+ authorizationUrl: https://example.com/api/oauth/auth
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ password:
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ clientCredentials:
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ authorizationCode: 123
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-authorizationUrl-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-authorizationUrl-type.yaml
new file mode 100644
index 00000000..af8b3349
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-authorizationUrl-type.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl:
+ prop: 1
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-clientCredentials-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-clientCredentials-type.yaml
new file mode 100644
index 00000000..98ecd9b7
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-clientCredentials-type.yaml
@@ -0,0 +1,47 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ implicit:
+ authorizationUrl: https://example.com/api/oauth/auth
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ password:
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ clientCredentials: 123
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-implicit-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-implicit-type.yaml
new file mode 100644
index 00000000..c2e25e85
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-implicit-type.yaml
@@ -0,0 +1,47 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ implicit: 123
+ password:
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ clientCredentials:
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-password-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-password-type.yaml
new file mode 100644
index 00000000..addcf337
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-password-type.yaml
@@ -0,0 +1,47 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ implicit:
+ authorizationUrl: https://example.com/api/oauth/auth
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ password: 123
+ clientCredentials:
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-refreshUrl-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-refreshUrl-type.yaml
new file mode 100644
index 00000000..1522da41
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-refreshUrl-type.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl:
+ prop: 1
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-scopes-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-scopes-type.yaml
new file mode 100644
index 00000000..6a0fd5af
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-scopes-type.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes: 123
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-tokenUrl-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-tokenUrl-type.yaml
new file mode 100644
index 00000000..418a80d1
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/Fields Types/invalid-tokenUrl-type.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ tokenUrl:
+ prop: 1
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-authorizationUrl-format.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-authorizationUrl-format.yaml
new file mode 100644
index 00000000..6a34a14a
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-authorizationUrl-format.yaml
@@ -0,0 +1,34 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: invalid url
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-authorizationCode-authrozationUrl.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-authorizationCode-authrozationUrl.yaml
new file mode 100644
index 00000000..2a9ceb94
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-authorizationCode-authrozationUrl.yaml
@@ -0,0 +1,33 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ authorizationCode:
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-authorizationCode-tokenUrl.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-authorizationCode-tokenUrl.yaml
new file mode 100644
index 00000000..150debc7
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-authorizationCode-tokenUrl.yaml
@@ -0,0 +1,33 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-clientCredentials-tokenUrl.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-clientCredentials-tokenUrl.yaml
new file mode 100644
index 00000000..94597e24
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-clientCredentials-tokenUrl.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ clientCredentials:
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-flows.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-flows.yaml
new file mode 100644
index 00000000..4229ac6d
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-flows.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-implicit-authorizationUrl.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-implicit-authorizationUrl.yaml
new file mode 100644
index 00000000..96dee30b
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-implicit-authorizationUrl.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ implicit:
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-scopes.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-scopes.yaml
new file mode 100644
index 00000000..8e1b36a4
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-missing-scopes.yaml
@@ -0,0 +1,30 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ implicit:
+ authorizationUrl: https://example.com/api/oauth/auth
+ refreshUrl: https://example.com/api/oauth/refresh
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-password-missing-tokenUrl.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-password-missing-tokenUrl.yaml
new file mode 100644
index 00000000..b362e494
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-password-missing-tokenUrl.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ password:
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-refreshUrl-format.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-refreshUrl-format.yaml
new file mode 100644
index 00000000..48dd1da0
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-refreshUrl-format.yaml
@@ -0,0 +1,34 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: invalid url
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-tokenUrl-format.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-tokenUrl-format.yaml
new file mode 100644
index 00000000..4fa7a67d
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/invalid-tokenUrl-format.yaml
@@ -0,0 +1,34 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ tokenUrl: invalid url
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/valid-empty-flows.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/valid-empty-flows.yaml
new file mode 100644
index 00000000..a1942fea
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/valid-empty-flows.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
diff --git a/tests/asyncapi-2.0/Security Scheme Object/oauth2/valid.yaml b/tests/asyncapi-2.0/Security Scheme Object/oauth2/valid.yaml
new file mode 100644
index 00000000..c5407272
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/oauth2/valid.yaml
@@ -0,0 +1,52 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: oauth2
+ flows:
+ implicit:
+ authorizationUrl: https://example.com/api/oauth/auth
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ password:
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ clientCredentials:
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ authorizationCode:
+ authorizationUrl: https://example.com/api/oauth/auth
+ tokenUrl: https://example.com/api/oauth/token
+ refreshUrl: https://example.com/api/oauth/refresh
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
diff --git a/tests/asyncapi-2.0/Security Scheme Object/openIdConnect/valid.yaml b/tests/asyncapi-2.0/Security Scheme Object/openIdConnect/valid.yaml
new file mode 100644
index 00000000..142353e9
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/openIdConnect/valid.yaml
@@ -0,0 +1,27 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity:
+ - write:pets
+ - read:pets
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: openIdConnect
+ openIdConnectUrl: http://foo.com
diff --git a/tests/asyncapi-2.0/Security Scheme Object/symmetricEncryption/valid.yaml b/tests/asyncapi-2.0/Security Scheme Object/symmetricEncryption/valid.yaml
new file mode 100644
index 00000000..b870d7c9
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/symmetricEncryption/valid.yaml
@@ -0,0 +1,24 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: symmetricEncryption
diff --git a/tests/asyncapi-2.0/Security Scheme Object/userPassword/invalid-missing-type.yaml b/tests/asyncapi-2.0/Security Scheme Object/userPassword/invalid-missing-type.yaml
new file mode 100644
index 00000000..7b2005d8
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/userPassword/invalid-missing-type.yaml
@@ -0,0 +1,24 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ description: generic security scheme
diff --git a/tests/asyncapi-2.0/Security Scheme Object/userPassword/valid.yaml b/tests/asyncapi-2.0/Security Scheme Object/userPassword/valid.yaml
new file mode 100644
index 00000000..e7122be8
--- /dev/null
+++ b/tests/asyncapi-2.0/Security Scheme Object/userPassword/valid.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ security:
+ - mainSecurity: []
+
+components:
+ securitySchemes:
+ mainSecurity:
+ type: userPassword
+ description: generic security scheme
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml
new file mode 100644
index 00000000..e4045662
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-bindingVersion-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 1
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-cleanSession-type.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-cleanSession-type.yaml
new file mode 100644
index 00000000..f916bb5c
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-cleanSession-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId: guest
+ cleanSession: 123
+ lastWill:
+ topic: /last-wills
+ qos: 2
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-clientId-type.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-clientId-type.yaml
new file mode 100644
index 00000000..caa0ae6e
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-clientId-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId:
+ prop: 1
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 2
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-keepAlive-type.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-keepAlive-type.yaml
new file mode 100644
index 00000000..b9544a2a
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-keepAlive-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 1
+ message: Guest gone offline.
+ retain: false
+ keepAlive: qwe
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-message-type.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-message-type.yaml
new file mode 100644
index 00000000..0430cb34
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-message-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 2
+ message:
+ prop: 1
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-qos-type.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-qos-type.yaml
new file mode 100644
index 00000000..69520c72
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-qos-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos:
+ prop: 1
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-retain-type.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-retain-type.yaml
new file mode 100644
index 00000000..02e2b9e0
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-retain-type.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 1
+ message: Guest gone offline.
+ retain: qwe
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-topic-type.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-topic-type.yaml
new file mode 100644
index 00000000..dccbfffd
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-topic-type.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic:
+ prop: 1
+ qos: 2
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-type.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-type.yaml
new file mode 100644
index 00000000..36de3a91
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/Fields Types/invalid-lastWill-type.yaml
@@ -0,0 +1,24 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill: 123
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/invalid-extra-properties.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/invalid-extra-properties.yaml
new file mode 100644
index 00000000..dc5f53c7
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/invalid-extra-properties.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ hello: 1
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 2
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/mqtt/valid.yaml b/tests/asyncapi-2.0/Server Bindings Object/mqtt/valid.yaml
new file mode 100644
index 00000000..1a720ddd
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/mqtt/valid.yaml
@@ -0,0 +1,28 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
+ mqtt:
+ clientId: guest
+ cleanSession: true
+ lastWill:
+ topic: /last-wills
+ qos: 2
+ message: Guest gone offline.
+ retain: false
+ keepAlive: 60
+ bindingVersion: '0.1.0'
diff --git a/tests/asyncapi-2.0/Server Bindings Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Server Bindings Object/valid-empty-object.yaml
new file mode 100644
index 00000000..aeaf0f61
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Bindings Object/valid-empty-object.yaml
@@ -0,0 +1,18 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: mqtt
+ bindings:
diff --git a/tests/asyncapi-2.0/Server Object/Fields Types/invalid-bindings-type.yaml b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-bindings-type.yaml
new file mode 100644
index 00000000..3f35a320
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-bindings-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com/{id}
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
+ bindings: 123
diff --git a/tests/asyncapi-2.0/Server Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..73cfcf19
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Server Object/Fields Types/invalid-protocol-type.yaml b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-protocol-type.yaml
new file mode 100644
index 00000000..85c53525
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-protocol-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol:
+ prop: 1
+ protocolVersion: '1.0.0'
+ description: Development server
diff --git a/tests/asyncapi-2.0/Server Object/Fields Types/invalid-protocolVersion-type.yaml b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-protocolVersion-type.yaml
new file mode 100644
index 00000000..de1c5e51
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-protocolVersion-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ protocolVersion:
+ prop: 1
+ description: Development server
diff --git a/tests/asyncapi-2.0/Server Object/Fields Types/invalid-security-type.yaml b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-security-type.yaml
new file mode 100644
index 00000000..93fdf965
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-security-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
+ security: 123
diff --git a/tests/asyncapi-2.0/Server Object/Fields Types/invalid-url-type.yaml b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-url-type.yaml
new file mode 100644
index 00000000..f64c0dd8
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-url-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url:
+ prop: 1
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
diff --git a/tests/asyncapi-2.0/Server Object/Fields Types/invalid-variables-type.yaml b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-variables-type.yaml
new file mode 100644
index 00000000..8adf5e56
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/Fields Types/invalid-variables-type.yaml
@@ -0,0 +1,20 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: string
+
+servers:
+ production:
+ url: development.gigantic-server.com/{id}
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
+ variables: 123
diff --git a/tests/asyncapi-2.0/Server Object/invalid-inexisting-security-scheme.yaml b/tests/asyncapi-2.0/Server Object/invalid-inexisting-security-scheme.yaml
new file mode 100644
index 00000000..5d321fc7
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/invalid-inexisting-security-scheme.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
+ security:
+ - complex: []
+
+components:
+ securitySchemes:
+ simple:
+ type: httpApiKey
+ name: Api-Key
+ in: header
diff --git a/tests/asyncapi-2.0/Server Object/invalid-missing-protocol.yaml b/tests/asyncapi-2.0/Server Object/invalid-missing-protocol.yaml
new file mode 100644
index 00000000..c7cecf22
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/invalid-missing-protocol.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocolVersion: '1.0.0'
+ description: Development server
diff --git a/tests/asyncapi-2.0/Server Object/invalid-missing-url.yaml b/tests/asyncapi-2.0/Server Object/invalid-missing-url.yaml
new file mode 100644
index 00000000..0ad0f922
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/invalid-missing-url.yaml
@@ -0,0 +1,22 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
diff --git a/tests/asyncapi-2.0/Server Object/valid-multiple-servers.yaml b/tests/asyncapi-2.0/Server Object/valid-multiple-servers.yaml
new file mode 100644
index 00000000..c1244e17
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/valid-multiple-servers.yaml
@@ -0,0 +1,33 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ development:
+ url: development.gigantic-server.com
+ description: Development server
+ protocol: amqp
+ protocolVersion: '0.9.1'
+ staging:
+ url: staging.gigantic-server.com
+ description: Staging server
+ protocol: amqp
+ protocolVersion: '0.9.1'
+ production:
+ url: api.gigantic-server.com
+ description: Production server
+ protocol: amqp
+ protocolVersion: '0.9.1'
diff --git a/tests/asyncapi-2.0/Server Object/valid-not-official-protocol.yaml b/tests/asyncapi-2.0/Server Object/valid-not-official-protocol.yaml
new file mode 100644
index 00000000..e9a509bf
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/valid-not-official-protocol.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: custom-protocol
+ protocolVersion: '1.0.0'
+ description: Development server
diff --git a/tests/asyncapi-2.0/Server Object/valid-relative-url.yaml b/tests/asyncapi-2.0/Server Object/valid-relative-url.yaml
new file mode 100644
index 00000000..98898536
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/valid-relative-url.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ dev:
+ url: /dev/pubserver/
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
diff --git a/tests/asyncapi-2.0/Server Object/valid-security.yaml b/tests/asyncapi-2.0/Server Object/valid-security.yaml
new file mode 100644
index 00000000..c76bcf36
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/valid-security.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
+ security:
+ - simple: []
+
+components:
+ securitySchemes:
+ simple:
+ type: httpApiKey
+ name: Api-Key
+ in: header
diff --git a/tests/asyncapi-2.0/Server Object/valid.yaml b/tests/asyncapi-2.0/Server Object/valid.yaml
new file mode 100644
index 00000000..b11b2171
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Object/valid.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
+ protocolVersion: '1.0.0'
+ description: Development server
diff --git a/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-default-type.yaml b/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-default-type.yaml
new file mode 100644
index 00000000..4114218b
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-default-type.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: '{username}.gigantic-server.com:{port}'
+ description: The production API server
+ protocol: secure-mqtt
+ variables:
+ username:
+ default: demo
+ description: Active user name
+ examples:
+ - 'admin'
+ - 'user123'
+ port:
+ enum:
+ - '8883'
+ - '8884'
+ default:
+ prop: 1
diff --git a/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..70851aa0
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: '{username}.gigantic-server.com:{port}'
+ description: The production API server
+ protocol: secure-mqtt
+ variables:
+ username:
+ default: demo
+ description:
+ prop: 1
+ examples:
+ - 'admin'
+ - 'user123'
+ port:
+ enum:
+ - '8883'
+ - '8884'
+ default: '8883'
diff --git a/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-enum-type.yaml b/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-enum-type.yaml
new file mode 100644
index 00000000..1e111a8c
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-enum-type.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: '{username}.gigantic-server.com:{port}'
+ description: The production API server
+ protocol: secure-mqtt
+ variables:
+ username:
+ default: demo
+ description: Active user name
+ examples:
+ - 'admin'
+ - 'user123'
+ port:
+ enum: 123
+ default: '8883'
diff --git a/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-examples-type.yaml b/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-examples-type.yaml
new file mode 100644
index 00000000..784a95a6
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Variable Object/Fields Types/invalid-examples-type.yaml
@@ -0,0 +1,32 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: '{username}.gigantic-server.com:{port}'
+ description: The production API server
+ protocol: secure-mqtt
+ variables:
+ username:
+ default: demo
+ description: Active user name
+ examples: 123
+ port:
+ enum:
+ - '8883'
+ - '8884'
+ default: '8883'
diff --git a/tests/asyncapi-2.0/Server Variable Object/invalid-examples-item.yaml b/tests/asyncapi-2.0/Server Variable Object/invalid-examples-item.yaml
new file mode 100644
index 00000000..2d5686a7
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Variable Object/invalid-examples-item.yaml
@@ -0,0 +1,35 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: '{username}.gigantic-server.com:{port}'
+ description: The production API server
+ protocol: secure-mqtt
+ variables:
+ username:
+ default: demo
+ description: Active user name
+ examples:
+ - 'admin'
+ - 'user123'
+ port:
+ enum:
+ - '8883'
+ - '8884'
+ examples:
+ - '123123'
diff --git a/tests/asyncapi-2.0/Server Variable Object/valid-empty-object.yaml b/tests/asyncapi-2.0/Server Variable Object/valid-empty-object.yaml
new file mode 100644
index 00000000..fbc2b86a
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Variable Object/valid-empty-object.yaml
@@ -0,0 +1,24 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: '{username}.gigantic-server.com:{port}'
+ description: The production API server
+ protocol: secure-mqtt
+ variables:
+ username:
diff --git a/tests/asyncapi-2.0/Server Variable Object/valid-extra-variable.yaml b/tests/asyncapi-2.0/Server Variable Object/valid-extra-variable.yaml
new file mode 100644
index 00000000..10b6cfd7
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Variable Object/valid-extra-variable.yaml
@@ -0,0 +1,37 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: '{username}.gigantic-server.com:{port}'
+ description: The production API server
+ protocol: secure-mqtt
+ variables:
+ username:
+ default: demo
+ description: Active user name
+ examples:
+ - 'admin'
+ - 'user123'
+ port:
+ enum:
+ - '8883'
+ - '8884'
+ default: '8883'
+ userToken:
+ enum:
+ - '8883'
diff --git a/tests/asyncapi-2.0/Server Variable Object/valid-variable-not-defined.yaml b/tests/asyncapi-2.0/Server Variable Object/valid-variable-not-defined.yaml
new file mode 100644
index 00000000..7de6c9d0
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Variable Object/valid-variable-not-defined.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: '{username}.gigantic-server.com:{port}'
+ description: The production API server
+ protocol: secure-mqtt
+ variables:
+ username:
+ default: demo
+ description: Active user name
+ examples:
+ - 'admin'
+ - 'user123'
diff --git a/tests/asyncapi-2.0/Server Variable Object/valid.yaml b/tests/asyncapi-2.0/Server Variable Object/valid.yaml
new file mode 100644
index 00000000..2eb8418f
--- /dev/null
+++ b/tests/asyncapi-2.0/Server Variable Object/valid.yaml
@@ -0,0 +1,34 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: '{username}.gigantic-server.com:{port}'
+ description: The production API server
+ protocol: secure-mqtt
+ variables:
+ username:
+ default: demo
+ description: Active user name
+ examples:
+ - 'admin'
+ - 'user123'
+ port:
+ enum:
+ - '8883'
+ - '8884'
+ default: '8883'
diff --git a/tests/asyncapi-2.0/Servers Object/invalid-patterned-field.yaml b/tests/asyncapi-2.0/Servers Object/invalid-patterned-field.yaml
new file mode 100644
index 00000000..de6465dd
--- /dev/null
+++ b/tests/asyncapi-2.0/Servers Object/invalid-patterned-field.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production$!@&*^!%@$:
+ url: development.gigantic-server.com
+ protocol: kafka
diff --git a/tests/asyncapi-2.0/Servers Object/valid.yaml b/tests/asyncapi-2.0/Servers Object/valid.yaml
new file mode 100644
index 00000000..b1bd3005
--- /dev/null
+++ b/tests/asyncapi-2.0/Servers Object/valid.yaml
@@ -0,0 +1,21 @@
+asyncapi: 2.0.0
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
+
+servers:
+ production:
+ url: development.gigantic-server.com
+ protocol: kafka
diff --git a/tests/asyncapi-2.0/Specification Extensions/valid.yaml b/tests/asyncapi-2.0/Specification Extensions/valid.yaml
new file mode 100644
index 00000000..1dc018a1
--- /dev/null
+++ b/tests/asyncapi-2.0/Specification Extensions/valid.yaml
@@ -0,0 +1,29 @@
+asyncapi: 2.0.0
+
+x-internal-id:
+ identificationSource: http://some.url.co/foo/bar
+ expirationTimer: 6000
+
+externalDocs:
+ description: Find more info here
+ url: https://example.com
+
+tags:
+ - name: user
+ description: user signed up
+ - name: signup
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Tag Object/Fields Types/invalid-description-type.yaml b/tests/asyncapi-2.0/Tag Object/Fields Types/invalid-description-type.yaml
new file mode 100644
index 00000000..787f32a0
--- /dev/null
+++ b/tests/asyncapi-2.0/Tag Object/Fields Types/invalid-description-type.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+tags:
+ - name: qwe
+ description:
+ prop: 1
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ - name: register
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Tag Object/Fields Types/invalid-externalDocs-type.yaml b/tests/asyncapi-2.0/Tag Object/Fields Types/invalid-externalDocs-type.yaml
new file mode 100644
index 00000000..a985b7d7
--- /dev/null
+++ b/tests/asyncapi-2.0/Tag Object/Fields Types/invalid-externalDocs-type.yaml
@@ -0,0 +1,23 @@
+asyncapi: 2.0.0
+
+tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs: 123
+ - name: register
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Tag Object/Fields Types/invalid-name-type.yaml b/tests/asyncapi-2.0/Tag Object/Fields Types/invalid-name-type.yaml
new file mode 100644
index 00000000..f19190c4
--- /dev/null
+++ b/tests/asyncapi-2.0/Tag Object/Fields Types/invalid-name-type.yaml
@@ -0,0 +1,26 @@
+asyncapi: 2.0.0
+
+tags:
+ - name:
+ prop: 1
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ - name: register
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Tag Object/invalid-missing-name.yaml b/tests/asyncapi-2.0/Tag Object/invalid-missing-name.yaml
new file mode 100644
index 00000000..516aa42d
--- /dev/null
+++ b/tests/asyncapi-2.0/Tag Object/invalid-missing-name.yaml
@@ -0,0 +1,19 @@
+asyncapi: 2.0.0
+
+tags:
+ - description: user signed up
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email
diff --git a/tests/asyncapi-2.0/Tag Object/valid.yaml b/tests/asyncapi-2.0/Tag Object/valid.yaml
new file mode 100644
index 00000000..c3af4f8c
--- /dev/null
+++ b/tests/asyncapi-2.0/Tag Object/valid.yaml
@@ -0,0 +1,25 @@
+asyncapi: 2.0.0
+
+tags:
+ - name: user
+ description: user signed up
+ - name: signup
+ externalDocs:
+ description: Find more info here
+ url: https://example.com
+ - name: register
+
+info:
+ title: Signup service example (internal)
+ version: 0.1.0
+
+channels:
+ /user/signedup:
+ subscribe:
+ message:
+ payload:
+ type: object
+ properties:
+ email:
+ type: string
+ format: email