-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: stop with v3 implementation (#551)
- Loading branch information
1 parent
7fc5916
commit 62f5ffe
Showing
20 changed files
with
5 additions
and
643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,7 @@ | ||
import { BaseModel } from "../base"; | ||
import { Info } from "./info"; | ||
import { Servers } from "./servers"; | ||
import { Server } from "./server"; | ||
|
||
import { Mixin } from '../utils'; | ||
import { ExtensionsMixin } from './mixins/extensions'; | ||
|
||
import type { AsyncAPIDocumentInterface, InfoInterface } from "../../models"; | ||
import type { ServersInterface } from "models/servers"; | ||
|
||
export class AsyncAPIDocument | ||
extends Mixin(BaseModel, ExtensionsMixin) | ||
implements AsyncAPIDocumentInterface { | ||
|
||
export class AsyncAPIDocument extends BaseModel { | ||
version(): string { | ||
return this._json.asyncapi; | ||
} | ||
|
||
info(): InfoInterface { | ||
return this.createModel(Info, this._json.info, { pointer: '/info' }); | ||
} | ||
|
||
servers(): ServersInterface { | ||
return new Servers( | ||
Object.entries(this._json.servers).map(([serverName, server]) => | ||
this.createModel(Server, server, { id: serverName, pointer: `/servers/${serverName}` }) | ||
) | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1 @@ | ||
export { AsyncAPIDocument as AsyncAPIDocumentV3 } from './asyncapi'; | ||
export { Contact as ContactV3 } from './contact'; | ||
export { Info as InfoV3 } from './info'; | ||
export { License as LicenseV3 } from './license'; | ||
export { Bindings as BindingsV3, Binding as BindingV3 } from './mixins/bindings'; | ||
export { Extensions as ExtensionsV3, Extension as ExtensionV3 } from './mixins/extensions'; | ||
export { ExternalDocumentation as ExternalDocumentationV3 } from './mixins/external-docs'; | ||
export { Tags as TagsV3, Tag as TagV3 } from './mixins/tags'; | ||
export { Server as ServerV3 } from './server'; | ||
export { Servers as ServersV3 } from './servers'; | ||
export { SecurityScheme as SecuritySchemeV3 } from './security-scheme'; | ||
export { SecuritySchemes as SecuritySchemesV3 } from './security-schemes'; | ||
export { ServerVariable as ServerVariableV3 } from './server-variable'; | ||
export { ServerVariables as ServerVariablesV3 } from './server-variables'; | ||
export {OAuthFlow as OAuthFlowV3} from './oauth-flow'; | ||
export {OAuthFlows as OAuthFlowsV3} from './oauth-flows'; | ||
export { AsyncAPIDocument as AsyncAPIDocumentV3 } from './asyncapi'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.