Skip to content

Commit

Permalink
jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
bravo-kernel committed Aug 17, 2019
1 parent 2477a96 commit 0af3609
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/schema-manager.js
Expand Up @@ -48,7 +48,7 @@ class SchemaManager {
*
* @param {Sequelize.Model} model Instance of Sequelize.Model
* @param {StrategyInterface} strategy Strategy instance
* @returns {string} Json string containing the schema
* @returns {object} Object contaiing the strategy-specific schema
*/
generate(model, strategy) {
if (model === undefined) throw new Error('Missing method argument');
Expand Down
4 changes: 2 additions & 2 deletions lib/strategies/json-schema-v7.js
Expand Up @@ -3,7 +3,7 @@
const StrategyInterface = require('../strategy-interface');

/**
* Strategy class responsible for converting Sequelize models into "JSON Schema v7" schemas.
* Class responsible for converting Sequelize models into "JSON Schema Draft-07" schemas.
*
* @augments StrategyInterface
*/
Expand Down Expand Up @@ -55,7 +55,7 @@ class JsonSchema7Strategy extends StrategyInterface {
/**
* Returns `null` to be used as direct property of `format`
*
* @example
* @example null
*
* @returns {object|string}
*/
Expand Down
10 changes: 5 additions & 5 deletions lib/strategies/openapi-v3.js
Expand Up @@ -3,15 +3,15 @@
const StrategyInterface = require('../strategy-interface');

/**
* Strategy class responsible for converting Sequelize models into "OpenAPI v3" schemas.
* Class responsible for converting Sequelize models into "OpenAPI 3.0" schemas.
*
* @augments StrategyInterface
*/
class OpenApi3Strategy extends StrategyInterface {
/**
* Returns the full URI to the online OpenAPI v3 schema (validation) file.
*
* @example https://github.com/OAI/OpenAPI-Specification/raw/master/schemas/v2.0/schema.json
* @example https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json
* @returns {string}
*/
Expand All @@ -21,7 +21,7 @@ class OpenApi3Strategy extends StrategyInterface {

/**
* OpenAPI v3 does not support/allow support the "schema" property so we
* omit the property from appearing in the schema by returning `null`.
* omit the property from the schema by returning `null`.
*
* @example null
*
Expand All @@ -33,7 +33,7 @@ class OpenApi3Strategy extends StrategyInterface {

/**
* OpenAPI v3 does not support/allow support the "identifier" property so we
* omit the property from appearing in the schema by returning `null`.
* omit the property from the schema by returning `null`.
*
* @example null
*
Expand All @@ -57,7 +57,7 @@ class OpenApi3Strategy extends StrategyInterface {
/**
* Returns new property `nullable: true` used as new property
*
* @example
* @example { 'nullable': 'true' }
*
* @returns {object|string}
*/
Expand Down
11 changes: 0 additions & 11 deletions lib/strategy-interface.js
Expand Up @@ -62,17 +62,6 @@ class StrategyInterface {
this.constructor._throwMissingImplementationError(this.constructor.name, 'getNullProperty');
}

/**
* Must return the strategy specific 'example' property.
*
* @param {string} raw Raw value as derived from the Sequelize model
* @returns {object|null}
*/
// prettier-ignore
getExampleProperty(raw) { // eslint-disable-line no-unused-vars
this.constructor._throwMissingImplementationError(this.constructor.name, 'getExampleProperty');
}

/**
* Throws an error if the strategy has not impemented one of the required methods.
*
Expand Down

0 comments on commit 0af3609

Please sign in to comment.