-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser-adapter-yaml-1-2): fix bug related to explicit tag resolut…
- Loading branch information
Showing
6 changed files
with
107 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ApiDOMStructuredError } from '@swagger-api/apidom-error'; | ||
|
||
class YamlSchemaError extends ApiDOMStructuredError {} | ||
|
||
export default YamlSchemaError; |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { ApiDOMErrorOptions } from '@swagger-api/apidom-error'; | ||
|
||
import YamlSchemaError from './YamlSchemaError'; | ||
import Position from '../../Position'; | ||
|
||
export interface YamlTagErrorOptions extends ApiDOMErrorOptions { | ||
readonly specificTagName: string; | ||
readonly explicitTagName: string; | ||
readonly tagKind: string; | ||
readonly tagPosition?: Position; | ||
readonly nodeCanonicalContent?: string; | ||
} | ||
|
||
class YamlTagError extends YamlSchemaError { | ||
public readonly specificTagName!: string; | ||
|
||
public readonly explicitTagName!: string; | ||
|
||
public readonly tagKind!: string; | ||
|
||
public readonly tagPosition?: Position; | ||
|
||
public readonly nodeCanonicalContent?: string; | ||
|
||
constructor(message?: string, structuredOptions?: YamlTagErrorOptions) { | ||
super(message, structuredOptions); | ||
|
||
if (typeof structuredOptions !== 'undefined') { | ||
this.specificTagName = structuredOptions.specificTagName; | ||
this.explicitTagName = structuredOptions.explicitTagName; | ||
this.tagKind = structuredOptions.tagKind; | ||
this.tagPosition = structuredOptions.tagPosition; | ||
this.nodeCanonicalContent = structuredOptions.nodeCanonicalContent; | ||
} | ||
} | ||
} | ||
|
||
export default YamlTagError; |
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
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