Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loopback/openapi-spec

Package Overview
Dependencies
Maintainers
22
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loopback/openapi-spec - npm Package Compare versions

Comparing version 4.0.0-alpha.7 to 4.0.0-alpha.8

4

lib/index.js

@@ -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

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc