-
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.
feat: add reference related metadata to namespaces
- Loading branch information
Showing
7 changed files
with
511 additions
and
3 deletions.
There are no files selected for viewing
14 changes: 13 additions & 1 deletion
14
...ages/apidom-ns-asyncapi-2-0/src/refractor/visitors/async-api-2-0/reference/$RefVisitor.ts
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,5 +1,17 @@ | ||
import stampit from 'stampit'; | ||
import { StringElement, BREAK } from 'apidom'; | ||
|
||
import FallbackVisitor from '../../FallbackVisitor'; | ||
|
||
const $RefVisitor = FallbackVisitor; | ||
const $RefVisitor = stampit(FallbackVisitor, { | ||
methods: { | ||
StringElement(stringElement: StringElement) { | ||
this.element = stringElement.clone(); | ||
this.element.classes.push('reference-field'); | ||
|
||
return BREAK; | ||
}, | ||
}, | ||
}); | ||
|
||
export default $RefVisitor; |
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
231 changes: 231 additions & 0 deletions
231
apidom/packages/apidom-ns-asyncapi-2-0/test/refractor/__snapshots__/index.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
14 changes: 13 additions & 1 deletion
14
...ckages/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/reference/$RefVisitor.ts
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,5 +1,17 @@ | ||
import stampit from 'stampit'; | ||
import { StringElement, BREAK } from 'apidom'; | ||
|
||
import FallbackVisitor from '../../FallbackVisitor'; | ||
|
||
const $RefVisitor = FallbackVisitor; | ||
const $RefVisitor = stampit(FallbackVisitor, { | ||
methods: { | ||
StringElement(stringElement: StringElement) { | ||
this.element = stringElement.clone(); | ||
this.element.classes.push('reference-field'); | ||
|
||
return BREAK; | ||
}, | ||
}, | ||
}); | ||
|
||
export default $RefVisitor; |
14 changes: 13 additions & 1 deletion
14
.../packages/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/$refVisitor.ts
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,5 +1,17 @@ | ||
import stampit from 'stampit'; | ||
import { StringElement, BREAK } from 'apidom'; | ||
|
||
import FallbackVisitor from '../../FallbackVisitor'; | ||
|
||
const $refVisitor = FallbackVisitor; | ||
const $refVisitor = stampit(FallbackVisitor, { | ||
methods: { | ||
StringElement(stringElement: StringElement) { | ||
this.element = stringElement.clone(); | ||
this.element.classes.push('reference-field'); | ||
|
||
return BREAK; | ||
}, | ||
}, | ||
}); | ||
|
||
export default $refVisitor; |
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
229 changes: 229 additions & 0 deletions
229
apidom/packages/apidom-ns-openapi-3-1/test/refractor/__snapshots__/index.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.