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: Visitor closure should give originName #121

Closed
sunrabbit123 opened this issue Jan 10, 2025 · 1 comment
Closed

Feat: Visitor closure should give originName #121

sunrabbit123 opened this issue Jan 10, 2025 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@sunrabbit123
Copy link

current, accessor in closure have weird name
maybe this name mean object path

However, on the other hand, there may be someone who needs that key value that was in the original component list.

@samchon samchon added the good first issue Good for newcomers label Jan 10, 2025
@samchon samchon self-assigned this Jan 10, 2025
@samchon samchon added bug Something isn't working enhancement New feature or request question Further information is requested labels Jan 10, 2025
@samchon
Copy link
Owner

samchon commented Jan 10, 2025

You can accomplish your mission by utilizing OpenApiTypeChecker.isReference() function like below.

OpenApiTypeChecker.visit({
  closure: (schema) => {
    if (OpenApiTypeChecker.isReference(schema))
      console.log(schema.$ref);
  },
  components: x,
  schema: y,
});

By the way, inspecting the OpenApiTypeChecker.visit() function's accessors, I've found another bug like below.

I will fix it not to include the # symbol.

$input.#.components.schemas["IMember"]

samchon added a commit that referenced this issue Jan 10, 2025
Fix #121: accessor bug including `#` symbol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants