Skip to content

Commit

Permalink
add extensions to the spec json schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
sambhavgupta0705 committed Nov 8, 2023
1 parent 9eb33e5 commit 3fdd0bc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions extensions/0.1.0/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "object",
"additionalProperties": false,
"properties": {
"x-twitter": {
"type": "string",
"description": "This extension allows you to provide the Twitter username of the account representing the team/company of the API.",
"example": [
"sambhavgupta75",
"AsyncAPISpec"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/extensions/0.1.0/info.json"
}
2 changes: 2 additions & 0 deletions tools/bundler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ const traverse = require('json-schema-traverse');
const { url } = require('inspector');
const definitionsDirectory = path.resolve(__dirname, '../../definitions');
const bindingsDirectory = path.resolve(__dirname, '../../bindings');
const extensionsDirectory = path.resolve(__dirname, '../../extensions');
const outputDirectory = path.resolve(__dirname, '../../schemas');
const JSON_SCHEMA_PROP_NAME = 'json-schema-draft-07-schema';
console.log(`Looking for separate definitions in the following directory: ${definitionsDirectory}`);
console.log(`Looking for binding version schemas in the following directory: ${bindingsDirectory}`);
console.log(`Looking for extension version schemas in the following directory: ${extensionsDirectory}`);
console.log(`Using the following output directory: ${outputDirectory}`);

// definitionsRegex is used to transform the name of a definition into a valid one to be used in the -without-$id.json files.
Expand Down

0 comments on commit 3fdd0bc

Please sign in to comment.