@loopback/openapi-spec
Advanced tools
Comparing version 4.0.0-alpha.7 to 4.0.0-alpha.8
@@ -6,3 +6,7 @@ "use strict"; | ||
// License text available at https://opensource.org/licenses/MIT | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./openapi-spec-v2")); | ||
//# sourceMappingURL=index.js.map |
@@ -13,2 +13,13 @@ /** | ||
/** | ||
* Specifies the Swagger Specification version being used. | ||
* It can be used by the Swagger UI and other clients to interpret | ||
* the API listing. The value MUST be "2.0". | ||
*/ | ||
swagger: '2.0'; | ||
/** | ||
* Provides metadata about the API. | ||
* The metadata can be used by the clients if needed. | ||
*/ | ||
info: InfoObject; | ||
/** | ||
* The host (name or ip) serving the API. | ||
@@ -37,2 +48,30 @@ * This MUST be the host only and does not include the scheme nor sub-paths. | ||
/** | ||
* The object provides metadata about the API. | ||
* The metadata can be used by the clients if needed, | ||
* and can be presented in the Swagger-UI for convenience. | ||
* <p>Specification: | ||
* https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#infoObject | ||
*/ | ||
export interface InfoObject { | ||
/** | ||
* The title of the application. | ||
*/ | ||
title: string; | ||
/** | ||
* A short description of the application. | ||
* [GFM syntax](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) | ||
* can be used for rich text representation. | ||
*/ | ||
description?: string; | ||
/** | ||
* The Terms of Service for the API. | ||
*/ | ||
termsOfService?: string; | ||
/** | ||
* Provides the version of the application API | ||
* (not to be confused with the specification version). | ||
*/ | ||
version: string; | ||
} | ||
/** | ||
* Holds the relative paths to the individual endpoints. | ||
@@ -115,2 +154,3 @@ * The path is appended to the basePath in order to construct the full URL. | ||
} | ||
export declare type ParameterTypeValue = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'file'; | ||
/** | ||
@@ -159,3 +199,8 @@ * Describes a single operation parameter. | ||
*/ | ||
type: string; | ||
type?: ParameterTypeValue; | ||
/** | ||
* _If in is "body":_ | ||
* The schema defining the type used for the body parameter. | ||
*/ | ||
schema?: SchemaObject; | ||
[extension: string]: ExtensionValue; | ||
@@ -262,1 +307,5 @@ } | ||
} | ||
/** | ||
* Create an empty OpenApiSpec object that's still a valid Swagger document. | ||
*/ | ||
export declare function createEmptyApiSpec(): OpenApiSpec; |
@@ -7,2 +7,17 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Create an empty OpenApiSpec object that's still a valid Swagger document. | ||
*/ | ||
function createEmptyApiSpec() { | ||
return { | ||
swagger: '2.0', | ||
basePath: '/', | ||
info: { | ||
title: 'LoopBack Application', | ||
version: '1.0.0', | ||
}, | ||
paths: {}, | ||
}; | ||
} | ||
exports.createEmptyApiSpec = createEmptyApiSpec; | ||
//# sourceMappingURL=openapi-spec-v2.js.map |
@@ -6,3 +6,7 @@ "use strict"; | ||
// License text available at https://opensource.org/licenses/MIT | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./openapi-spec-v2")); | ||
//# sourceMappingURL=index.js.map |
@@ -13,2 +13,13 @@ /** | ||
/** | ||
* Specifies the Swagger Specification version being used. | ||
* It can be used by the Swagger UI and other clients to interpret | ||
* the API listing. The value MUST be "2.0". | ||
*/ | ||
swagger: '2.0'; | ||
/** | ||
* Provides metadata about the API. | ||
* The metadata can be used by the clients if needed. | ||
*/ | ||
info: InfoObject; | ||
/** | ||
* The host (name or ip) serving the API. | ||
@@ -37,2 +48,30 @@ * This MUST be the host only and does not include the scheme nor sub-paths. | ||
/** | ||
* The object provides metadata about the API. | ||
* The metadata can be used by the clients if needed, | ||
* and can be presented in the Swagger-UI for convenience. | ||
* <p>Specification: | ||
* https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#infoObject | ||
*/ | ||
export interface InfoObject { | ||
/** | ||
* The title of the application. | ||
*/ | ||
title: string; | ||
/** | ||
* A short description of the application. | ||
* [GFM syntax](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) | ||
* can be used for rich text representation. | ||
*/ | ||
description?: string; | ||
/** | ||
* The Terms of Service for the API. | ||
*/ | ||
termsOfService?: string; | ||
/** | ||
* Provides the version of the application API | ||
* (not to be confused with the specification version). | ||
*/ | ||
version: string; | ||
} | ||
/** | ||
* Holds the relative paths to the individual endpoints. | ||
@@ -115,2 +154,3 @@ * The path is appended to the basePath in order to construct the full URL. | ||
} | ||
export declare type ParameterTypeValue = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'file'; | ||
/** | ||
@@ -159,3 +199,8 @@ * Describes a single operation parameter. | ||
*/ | ||
type: string; | ||
type?: ParameterTypeValue; | ||
/** | ||
* _If in is "body":_ | ||
* The schema defining the type used for the body parameter. | ||
*/ | ||
schema?: SchemaObject; | ||
[extension: string]: ExtensionValue; | ||
@@ -262,1 +307,5 @@ } | ||
} | ||
/** | ||
* Create an empty OpenApiSpec object that's still a valid Swagger document. | ||
*/ | ||
export declare function createEmptyApiSpec(): OpenApiSpec; |
@@ -7,2 +7,17 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Create an empty OpenApiSpec object that's still a valid Swagger document. | ||
*/ | ||
function createEmptyApiSpec() { | ||
return { | ||
swagger: '2.0', | ||
basePath: '/', | ||
info: { | ||
title: 'LoopBack Application', | ||
version: '1.0.0', | ||
}, | ||
paths: {}, | ||
}; | ||
} | ||
exports.createEmptyApiSpec = createEmptyApiSpec; | ||
//# sourceMappingURL=openapi-spec-v2.js.map |
{ | ||
"name": "@loopback/openapi-spec", | ||
"version": "4.0.0-alpha.7", | ||
"version": "4.0.0-alpha.8", | ||
"description": "TypeScript type definitions for OpenAPI Spec/Swagger documents.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -40,4 +40,12 @@ # @loopback/openapi-spec | ||
## License | ||
# Tests | ||
run `npm test` from the root folder. | ||
# Contributors | ||
See [all contributors](https://github.com/strongloop/loopback-next/graphs/contributors). | ||
# License | ||
MIT |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
500388
4089
51
5