Skip to content
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

feat: support property access via reference object #59

Merged
merged 2 commits into from
Sep 12, 2021

Conversation

Himenon
Copy link
Owner

@Himenon Himenon commented Sep 12, 2021

Summary

Support property access via reference object

$ref: "#/components/schemas/Book/properties/author"

from: https://twitter.com/excelspeedup/status/1437002951264915456

Test Plan

add test code

@Himenon Himenon force-pushed the feat/support-access-property-from-reference-object branch from 5d02c48 to 4f9914c Compare September 12, 2021 12:26
@Himenon Himenon changed the title test: add property access test via reference object feat: support property access via reference object Sep 12, 2021
@Himenon Himenon merged commit bd70d56 into main Sep 12, 2021
@Himenon Himenon deleted the feat/support-access-property-from-reference-object branch September 12, 2021 14:07
name: convertContext.escapeReferenceDeclarationText(maybeResolvedName),
});
}
const schema = DotProp.get(context.rootSchema, pathArray.join(".")) as any;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

if (depth === 2) {
return factory.TypeReferenceNode.create({ name: converterContext.escapeReferenceDeclarationText(maybeResolvedName) });
} else {
const resolveSchema = DotProp.get(context.rootSchema, pathArray.join(".")) as any;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

/**
* @example components.a.b.c.dの場合 ["a", "b", "c", "d"].length = 4
**/
depth: number;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: refactoring target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant