mirror of
https://github.com/LukeHagar/openapi-types.git
synced 2025-12-06 12:37:47 +00:00
Prettier formatting
This commit is contained in:
258
3.1/security.ts
258
3.1/security.ts
@@ -79,80 +79,80 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface SecurityScheme extends Extension {
|
||||
/**
|
||||
* The type of the security scheme. This field is required.
|
||||
*
|
||||
* @example "apiKey"
|
||||
* @example "http"
|
||||
* @example "mutualTLS"
|
||||
* @example "oauth2"
|
||||
* @example "openIdConnect"
|
||||
*/
|
||||
type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
|
||||
/**
|
||||
* The type of the security scheme. This field is required.
|
||||
*
|
||||
* @example "apiKey"
|
||||
* @example "http"
|
||||
* @example "mutualTLS"
|
||||
* @example "oauth2"
|
||||
* @example "openIdConnect"
|
||||
*/
|
||||
type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
|
||||
|
||||
/**
|
||||
* A short description for security scheme. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "API key authentication"
|
||||
* @example "OAuth2 authentication with authorization code flow"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description for security scheme. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "API key authentication"
|
||||
* @example "OAuth2 authentication with authorization code flow"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The name of the header, query or cookie parameter to be used. This field
|
||||
* is required for `apiKey` type.
|
||||
*
|
||||
* @example "X-API-Key"
|
||||
* @example "api_key"
|
||||
* @example "sessionId"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The name of the header, query or cookie parameter to be used. This field
|
||||
* is required for `apiKey` type.
|
||||
*
|
||||
* @example "X-API-Key"
|
||||
* @example "api_key"
|
||||
* @example "sessionId"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The location of the API key. This field is required for `apiKey` type.
|
||||
*
|
||||
* @example "header"
|
||||
* @example "query"
|
||||
* @example "cookie"
|
||||
*/
|
||||
in?: "query" | "header" | "cookie";
|
||||
/**
|
||||
* The location of the API key. This field is required for `apiKey` type.
|
||||
*
|
||||
* @example "header"
|
||||
* @example "query"
|
||||
* @example "cookie"
|
||||
*/
|
||||
in?: "query" | "header" | "cookie";
|
||||
|
||||
/**
|
||||
* The name of the HTTP Authorization scheme to be used in the Authorization
|
||||
* header. This field is required for `http` type.
|
||||
*
|
||||
* @example "basic"
|
||||
* @example "bearer"
|
||||
* @example "digest"
|
||||
*/
|
||||
scheme?: string;
|
||||
/**
|
||||
* The name of the HTTP Authorization scheme to be used in the Authorization
|
||||
* header. This field is required for `http` type.
|
||||
*
|
||||
* @example "basic"
|
||||
* @example "bearer"
|
||||
* @example "digest"
|
||||
*/
|
||||
scheme?: string;
|
||||
|
||||
/**
|
||||
* A hint to the client to identify how the bearer token is formatted. Bearer
|
||||
* tokens are usually generated by an authorization server, so this information
|
||||
* is primarily for documentation purposes.
|
||||
*
|
||||
* @example "JWT"
|
||||
* @example "Bearer"
|
||||
*/
|
||||
bearerFormat?: string;
|
||||
/**
|
||||
* A hint to the client to identify how the bearer token is formatted. Bearer
|
||||
* tokens are usually generated by an authorization server, so this information
|
||||
* is primarily for documentation purposes.
|
||||
*
|
||||
* @example "JWT"
|
||||
* @example "Bearer"
|
||||
*/
|
||||
bearerFormat?: string;
|
||||
|
||||
/**
|
||||
* An object containing configuration information for the flow types supported.
|
||||
* This field is required for `oauth2` type.
|
||||
*
|
||||
* @example { authorizationCode: { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token" } }
|
||||
*/
|
||||
flows?: OAuthFlows;
|
||||
/**
|
||||
* An object containing configuration information for the flow types supported.
|
||||
* This field is required for `oauth2` type.
|
||||
*
|
||||
* @example { authorizationCode: { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token" } }
|
||||
*/
|
||||
flows?: OAuthFlows;
|
||||
|
||||
/**
|
||||
* OpenId Connect URL to discover OAuth2 configuration values. This MUST be
|
||||
* in the form of a URL. This field is required for `openIdConnect` type.
|
||||
*
|
||||
* @example "https://example.com/.well-known/openid_configuration"
|
||||
*/
|
||||
openIdConnectUrl?: string;
|
||||
/**
|
||||
* OpenId Connect URL to discover OAuth2 configuration values. This MUST be
|
||||
* in the form of a URL. This field is required for `openIdConnect` type.
|
||||
*
|
||||
* @example "https://example.com/.well-known/openid_configuration"
|
||||
*/
|
||||
openIdConnectUrl?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -199,33 +199,33 @@ export interface SecurityScheme extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface OAuthFlows extends Extension {
|
||||
/**
|
||||
* Configuration for the OAuth Implicit flow.
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
implicit?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Implicit flow.
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
implicit?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Resource Owner Password flow.
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
password?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Resource Owner Password flow.
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
password?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Client Credentials flow.
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
clientCredentials?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Client Credentials flow.
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
clientCredentials?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Authorization Code flow.
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
authorizationCode?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Authorization Code flow.
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
authorizationCode?: OAuthFlow;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -270,36 +270,36 @@ export interface OAuthFlows extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface OAuthFlow extends Extension {
|
||||
/**
|
||||
* The authorization URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* This field is required for `implicit` and `authorizationCode` flows.
|
||||
*
|
||||
* @example "https://example.com/oauth/authorize"
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
/**
|
||||
* The authorization URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* This field is required for `implicit` and `authorizationCode` flows.
|
||||
*
|
||||
* @example "https://example.com/oauth/authorize"
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
|
||||
/**
|
||||
* The token URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* This field is required for `password`, `clientCredentials`, and `authorizationCode` flows.
|
||||
*
|
||||
* @example "https://example.com/oauth/token"
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
/**
|
||||
* The token URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* This field is required for `password`, `clientCredentials`, and `authorizationCode` flows.
|
||||
*
|
||||
* @example "https://example.com/oauth/token"
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
|
||||
/**
|
||||
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
|
||||
*
|
||||
* @example "https://example.com/oauth/refresh"
|
||||
*/
|
||||
refreshUrl?: string;
|
||||
/**
|
||||
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
|
||||
*
|
||||
* @example "https://example.com/oauth/refresh"
|
||||
*/
|
||||
refreshUrl?: string;
|
||||
|
||||
/**
|
||||
* The available scopes for the OAuth2 security scheme. A map between the scope
|
||||
* name and a short description for it. This field is required.
|
||||
*
|
||||
* @example { "read:pets": "read your pets", "write:pets": "modify pets in your account" }
|
||||
*/
|
||||
scopes: Record<string, string>;
|
||||
/**
|
||||
* The available scopes for the OAuth2 security scheme. A map between the scope
|
||||
* name and a short description for it. This field is required.
|
||||
*
|
||||
* @example { "read:pets": "read your pets", "write:pets": "modify pets in your account" }
|
||||
*/
|
||||
scopes: Record<string, string>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -352,15 +352,15 @@ export interface OAuthFlow extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface SecurityRequirement {
|
||||
/**
|
||||
* Each name MUST correspond to a security scheme which is declared in the
|
||||
* Security Schemes under the Components Object. The value is an array of
|
||||
* scope names required for the execution. For OAuth2, the scopes are the
|
||||
* scopes required for the execution. For other security schemes, the array
|
||||
* MUST be empty.
|
||||
*
|
||||
* @example []
|
||||
* @example ["write:pets", "read:pets"]
|
||||
*/
|
||||
[name: string]: string[];
|
||||
/**
|
||||
* Each name MUST correspond to a security scheme which is declared in the
|
||||
* Security Schemes under the Components Object. The value is an array of
|
||||
* scope names required for the execution. For OAuth2, the scopes are the
|
||||
* scopes required for the execution. For other security schemes, the array
|
||||
* MUST be empty.
|
||||
*
|
||||
* @example []
|
||||
* @example ["write:pets", "read:pets"]
|
||||
*/
|
||||
[name: string]: string[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user