-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSDoc tags for Object and Record types #842
Labels
Comments
This is exact what I have intended. Hope to define an explicit object type. |
But it doesn't work with explicit object types either. See below when I add an explicit type Example/**
* @title Test Object
*/
export type Test =
{
/**
* @title Test Title
*/
title: string
/**
* @title Foo
*/
foo: FooType;
}
/**
* @title Foo Object
*/
type FooType = {
/**
* @title Bar
*/
bar: string
} Schema{
"Test": {
"$id": "#/components/schemas/Test",
"type": "object",
"properties": {
"title": {
"title": "Test Title",
"x-typia-jsDocTags": [
{
"name": "title",
"text": [
{
"text": "Test Title",
"kind": "text"
}
]
}
],
"x-typia-required": true,
"x-typia-optional": false,
"type": "string"
},
"foo": {
"$ref": "#/components/schemas/FooType"
}
},
"required": [
"title",
"foo"
],
"x-typia-jsDocTags": []
},
"FooType": {
"$id": "#/components/schemas/FooType",
"type": "object",
"properties": {
"bar": {
"title": "Bar",
"x-typia-jsDocTags": [
{
"name": "title",
"text": [
{
"text": "Bar",
"kind": "text"
}
]
}
],
"x-typia-required": true,
"x-typia-optional": false,
"type": "string"
}
},
"required": [
"bar"
],
"x-typia-jsDocTags": []
}
} |
samchon
added
bug
Something isn't working
and removed
wontfix
This will not be worked on
labels
Oct 12, 2023
Got it, no problem when using However, failed to catch the description and comment tags when using |
samchon
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Oct 12, 2023
samchon
added a commit
that referenced
this issue
Oct 12, 2023
Fix #842 - exact description comment tracing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Description
The parser doesn't include JSDoc tags in the schema for Object and Record types.
From the example below, you can see that property
title
which is of typestring
has non-emptyx-typia-jsDocTags
property as it should. But propertyfoo
as well as the whole typeTest
havex-typia-jsDocTags
property empty despite having a JSDoc comment with title. The same thing happens with properties of typeRecord<A,B>
.Example
Resulting schema components
The text was updated successfully, but these errors were encountered: