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

@types/swagger-jsdoc

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/swagger-jsdoc - npm Package Compare versions

Comparing version 3.0.2 to 6.0.0

289

swagger-jsdoc/index.d.ts

@@ -1,5 +0,6 @@

// Type definitions for swagger-jsdoc 3.0
// Type definitions for swagger-jsdoc 6.0
// Project: https://github.com/surnet/swagger-jsdoc
// Definitions by: Daniel Grove <https://github.com/drGrove>
// Neil Bryson Cargamento <https://github.com/neilbryson>
// Preyansh Mitharwal <https://github.com/preyansh07>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -15,11 +16,10 @@ // TypeScript Version: 2.3

const options: swaggerJSDoc.Options = {
swaggerDefinition: {
const options: swaggerJSDoc.OAS3Options = {
definition: {
openapi: '3.0.0',
info: {
title: 'Hello World',
version: '1.0.0',
description: 'A sample API'
},
host: 'localhost:3000',
basePath: '/'
description: 'A sample API',
version: '1.0.0'
}
},

@@ -48,22 +48,261 @@ apis: [

declare namespace swaggerJSDoc {
interface ApiInformation {
/**
* Open API Specification (OAS) version 3.0 options
*/
interface OAS3Options {
apis?: ReadonlyArray<string>;
definition?: OAS3Definition;
swaggerDefinition?: OAS3Definition;
[key: string]: any;
}
/**
* For describing Open API Specification (OAS) version 3.0
*/
interface OAS3Definition {
openapi: string;
info: Information;
servers?: ReadonlyArray<Server>;
paths?: Paths;
components?: Components;
security?: ReadonlyArray<SecurityRequirement>;
tags?: ReadonlyArray<Tag>;
externalDocs?: ExternalDocumentation;
[key: string]: any;
}
interface Information {
title: string;
description?: string;
title: string;
termsOfService?: string;
contact?: Contact;
license?: License;
version: string;
[key: string]: any;
}
interface ServerInformation {
interface Contact {
name?: string;
url?: string;
email?: string;
[key: string]: any;
}
interface License {
name: string;
url?: string;
[key: string]: any;
}
interface Server {
url: string;
description?: string;
variables?: { [key: string]: ServerVariable };
[key: string]: any;
}
interface SwaggerDefinition {
basePath?: string;
host?: string;
info: ApiInformation;
openapi?: string;
servers?: ReadonlyArray<ServerInformation>;
interface ServerVariable {
enum?: ReadonlyArray<string>;
default: string;
description?: string;
[key: string]: any;
}
interface Paths {
[key: string]: PathItem;
}
interface PathItem {
$ref?: string;
summary?: string;
description?: string;
get?: Operation;
put?: Operation;
post?: Operation;
delete?: Operation;
options?: Operation;
head?: Operation;
patch?: Operation;
trace?: Operation;
servers?: ReadonlyArray<Server>;
parameters?: Parameter | Reference;
[key: string]: any;
}
interface Operation {
tags?: string[];
summary?: string;
description?: string;
externalDocs?: ExternalDocumentation;
operationId?: string;
parameters?: ReadonlyArray<Parameter | Reference>;
requestBody?: RequestBody | Reference;
responses?: Responses;
callbacks?: { [key: string]: Callback | Reference };
deprecated?: boolean;
security?: ReadonlyArray<SecurityRequirement>;
servers?: ReadonlyArray<Server>;
[key: string]: any;
}
interface Parameter {
name: string;
in: string;
description?: string;
required?: boolean;
deprecated?: boolean;
allowEmptyValue?: boolean;
style?: string;
explode?: boolean;
allowReserved?: boolean;
schema?: Schema | Reference;
example?: any;
examples?: { [key: string]: Example | Reference };
[key: string]: any;
}
interface Schema {
type?: string;
format?: string;
[key: string]: any;
}
interface Reference {
$ref: string;
}
interface Example {
summary?: string;
description?: string;
value?: any;
externalValue?: string;
[key: string]: any;
}
interface RequestBody {
description?: string;
content: { [key: string]: MediaType };
required?: boolean;
[key: string]: any;
}
interface Responses {
default?: Response | Reference;
[key: string]: any;
}
interface Response {
description: string;
headers?: { [key: string]: Header | Reference };
content?: { [key: string]: MediaType };
links?: { [key: string]: Link | Reference };
[key: string]: any;
}
interface Header {
description?: string;
required?: boolean;
deprecated?: boolean;
allowEmptyValue?: boolean;
style?: string;
explode?: boolean;
allowReserved?: boolean;
schema?: Schema | Reference;
example?: any;
examples?: { [key: string]: Example | Reference };
[key: string]: any;
}
interface MediaType {
schema?: Schema | Reference;
example?: any;
examples?: { [key: string]: Example | Reference };
encoding?: { [key: string]: Encoding };
[key: string]: any;
}
interface Encoding {
contentType?: string;
headers?: { [key: string]: Header | Reference };
style?: string;
explode?: boolean;
allowReserved?: boolean;
[key: string]: any;
}
interface Link {
operationRef?: string;
operationId?: string;
parameters?: { [key: string]: any };
requestBody?: { [key: string]: any };
description?: string;
server?: Server;
[key: string]: any;
}
interface Callback {
[key: string]: PathItem;
}
interface SecurityRequirement {
[key: string]: ReadonlyArray<string>;
}
interface Components {
schemas?: { [key: string]: Schema | Reference };
responses?: { [key: string]: Response | Reference };
parameters?: { [key: string]: Parameter | Reference };
examples?: { [key: string]: Example | Reference };
requestBodies?: { [key: string]: RequestBody | Reference };
headers?: { [key: string]: Header | Reference };
securitySchemes?: { [key: string]: SecurityScheme | Reference };
links?: { [key: string]: Link | Reference };
callbacks?: { [key: string]: Callback | Reference };
[key: string]: any;
}
interface SecurityScheme {
type: string;
description?: string;
name?: string;
in?: string;
scheme?: string;
bearerFormat?: string;
flows?: OAuthFlows;
openIdConnectUrl?: string;
[key: string]: any;
}
interface OAuthFlows {
implicit?: OAuthFlow;
password?: OAuthFlow;
clientCredentials?: OAuthFlow;
authorizationCode?: OAuthFlow;
[key: string]: any;
}
interface OAuthFlow {
authorizationUrl?: string;
tokenUrl?: string;
refreshUrl?: string;
scopes: { [key: string]: string };
[key: string]: any;
}
interface Tag {
name: string;
description?: string;
externalDocs?: ExternalDocumentation;
[key: string]: any;
}
interface ExternalDocumentation {
description?: string;
url: string;
[key: string]: any;
}
/**
* Open API Specification (OAS) version 2.0 options (fka Swagger specification)
*/
interface Options {

@@ -75,4 +314,20 @@ apis?: ReadonlyArray<string>;

}
/**
* For describing Open API Specification (OAS) version 2.0 (fka Swagger specification)
*/
interface SwaggerDefinition {
swagger?: string;
info: Information;
host?: string;
basePath?: string;
schemes?: ReadonlyArray<string>;
consumes?: ReadonlyArray<string>;
produces?: ReadonlyArray<string>;
tags?: ReadonlyArray<Tag>;
externalDocs?: ExternalDocumentation;
[key: string]: any;
}
}
export = swaggerJSDoc;

13

swagger-jsdoc/package.json
{
"name": "@types/swagger-jsdoc",
"version": "3.0.2",
"version": "6.0.0",
"description": "TypeScript definitions for swagger-jsdoc",

@@ -16,6 +16,11 @@ "license": "MIT",

"githubUsername": "neilbryson"
},
{
"name": "Preyansh Mitharwal",
"url": "https://github.com/preyansh07",
"githubUsername": "preyansh07"
}
],
"main": "",
"types": "index",
"types": "index.d.ts",
"repository": {

@@ -28,4 +33,4 @@ "type": "git",

"dependencies": {},
"typesPublisherContentHash": "7f5a312348f49eaf94271b722716efa3d068ec3a4d37d9cd26f2dfe77ee8808f",
"typeScriptVersion": "2.3"
"typesPublisherContentHash": "1275632c910190b92390ef7557b8ff94138c5fdba637d4e54575967e08dbab02",
"typeScriptVersion": "3.3"
}

@@ -8,6 +8,6 @@ # Installation

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/swagger-jsdoc
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/swagger-jsdoc.
Additional Details
* Last updated: Mon, 19 Aug 2019 00:51:19 GMT
### Additional Details
* Last updated: Mon, 04 Jan 2021 20:50:47 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Daniel Grove <https://github.com/drGrove>, and Neil Bryson Cargamento <https://github.com/neilbryson>.
These definitions were written by [Daniel Grove](https://github.com/drGrove), [Neil Bryson Cargamento](https://github.com/neilbryson), and [Preyansh Mitharwal](https://github.com/preyansh07).

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