Skip to content

Commit

Permalink
Replace classes by interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
KostyaTretyak committed Mar 26, 2021
1 parent ddf0a5d commit 6666128
Show file tree
Hide file tree
Showing 29 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion versions/3.1/src/base-parameter-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ReferenceObject } from './reference-object';
import { SchemaObject } from './schema-object';
import { OasStyle } from './oas-style';

export class BaseParameterObject {
export interface BaseParameterObject {
/**
* A brief description of the parameter. This could contain examples of use.
* [CommonMark syntax][1] MAY be used for rich text representation.
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/callback-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ transactionCallback:
* [4]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#runtimeExpression
* [5]: https://tools.ietf.org/html/rfc6901
*/
export class CallbackObject {
export interface CallbackObject {
/**
* A Path Item Object, or a reference to one, used to define a callback request and expected
* responses. A [complete example][1] is available.
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/components-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ components:
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class ComponentsObject {
export interface ComponentsObject {
/**
* An object to hold reusable [Schema Objects][1].
*
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/contact-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ url: https://www.example.com/support
email: [email protected]
```
*/
export class ContactObject {
export interface ContactObject {
/**
* The identifying name of the contact person/organization.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/discriminator-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ components:
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class DiscriminatorObject {
export interface DiscriminatorObject {
/**
* The name of the property in the payload that will hold the discriminator value.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/encoding-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ requestBody:
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class EncodingObject {
export interface EncodingObject {
/**
* Content-Type for encoding a specific property. Default value depends on the property type:
* - for `object` - `application/json`;
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/example-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ responses:
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class ExampleObject {
export interface ExampleObject {
/**
* Short description for the example.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/external-documentation-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ url: https://example.com
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class ExternalDocumentationObject {
export interface ExternalDocumentationObject {
/**
* A description of the target documentation.
* [CommonMark syntax][1] MAY be used for rich text representation.
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/header-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ schema:
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameterObject
* [2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameterStyle
*/
export class HeaderObject extends BaseParameterObject {
export interface HeaderObject extends BaseParameterObject {
/**
* MUST NOT be specified, it is given in the corresponding `headers` map.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/info-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ license:
version: 1.0.1
```
*/
export class InfoObject {
export interface InfoObject {
/**
* The title of the API.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/license-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name: Apache 2.0
identifier: Apache-2.0
```
*/
export class LicenseObject {
export interface LicenseObject {
/**
* The license name used for the API.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/link-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ links:
* [2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#runtimeExpression
* [3]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operationObject
*/
export class LinkObject {
export interface LinkObject {
/**
* A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of
* the `operationId` field, and MUST point to an [Operation Object][1]. Relative
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/media-type-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ An `encoding` attribute is introduced to give you control over the serialization
* [6]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#encodingStyle
* [7]: https://tools.ietf.org/html/rfc7578
*/
export class MediaTypeObject {
export interface MediaTypeObject {
/**
* The schema defining the content of the request, response, or parameter.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/o-auth-flow-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ flows:
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class OAuthFlowObject {
export interface OAuthFlowObject {
/**
* Applies To `oauth2` (`"implicit"`, `"authorizationCode"`).
*
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/o-auth-flows-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { OAuthFlowObject } from './o-auth-flow-object';
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class OAuthFlowsObject {
export interface OAuthFlowsObject {
/**
* Configuration for the OAuth Implicit flow.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/oas-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { TagObject } from './tag-object';
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class OasObject {
export interface OasObject {
/**
* This string MUST be the [version number][1] of the [OpenAPI Specification version][1]
* that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/operation-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ security:
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class OperationObject {
export interface OperationObject {
/**
* A list of tags for API documentation control. Tags can be used for logical grouping of
* operations by resources or any other qualifier.
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/parameter-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ content:
* [7]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameterContent
* [8]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class ParameterObject extends BaseParameterObject {
export interface ParameterObject extends BaseParameterObject {
/**
* The name of the parameter. Parameter names are *case sensitive*.
* - If [`in`][1] is `"path"`, the `name` field MUST correspond to a template expression
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/path-item-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ parameters:
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
* [2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#securityFiltering
*/
export class PathItemObject {
export interface PathItemObject {
/**
* Allows for a referenced definition of this path item. The referenced structure MUST be
* in the form of a [Path Item Object][1]. In case a Path Item Object
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/reference-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $ref: definitions.yaml#/Pet
* [2]: https://tools.ietf.org/html/rfc3986
* [3]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#relativeReferencesURI
*/
export class ReferenceObject {
export interface ReferenceObject {
/**
* The reference identifier. This MUST be in the form of a URI.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/request-body-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ content:
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class RequestBodyObject {
export interface RequestBodyObject {
/**
* A brief description of the request body. This could contain examples of use.
* [CommonMark syntax][1] MAY be used for rich text representation.
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/response-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ description: object created
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class ResponseObject {
export interface ResponseObject {
/**
* A description of the response. [CommonMark syntax][1] MAY be used for rich text representation.
*
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/schema-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ components:
* [12]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#oasObject
* [13]: https://tools.ietf.org/html/draft-bhutton-json-schema-00#section-8.1.1
*/
export class SchemaObject {
export interface SchemaObject {
/**
* The "$ref" keyword is an applicator that is used to reference a
* statically identified schema. Its results are the results of the
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/security-requirement-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ security:
* [3]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#oasObject
* [4]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operationObject
*/
export class SecurityRequirementObject {
export interface SecurityRequirementObject {
/**
* Each name MUST correspond to a security scheme which is declared in the [Security Schemes][1]
* under the [Components Object][2]. If the security scheme is of type `"oauth2"` or
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/security-scheme-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ flows:
* [3]: https://tools.ietf.org/html/draft-ietf-oauth-security-topics
* [4]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class SecuritySchemeObject {
export interface SecuritySchemeObject {
/**
* Applies To any.
*
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/server-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ servers:
default: v2
```
*/
export class ServerObject {
export interface ServerObject {
/**
* A URL to the target host. This URL supports Server Variables and MAY be relative,
* to indicate that the host location is relative to the location where the OpenAPI document
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/server-variable-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class ServerVariableObject {
export interface ServerVariableObject {
/**
* An enumeration of string values to be used if the substitution options are from a limited set.
* The array MUST NOT be empty.
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/tag-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ description: Pets operations
* [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operationObject
* [2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specificationExtensions
*/
export class TagObject {
export interface TagObject {
/**
* The name of the tag.
*/
Expand Down
2 changes: 1 addition & 1 deletion versions/3.1/src/xml-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ animals:
* [2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#schemaObject
* [3]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#xmlWrapped
*/
export class XmlObject {
export interface XmlObject {
/**
* Replaces the name of the element/attribute used for the described schema property. When
* defined within `items`, it will affect the name of the individual XML elements within the
Expand Down

0 comments on commit 6666128

Please sign in to comment.