-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Some $ref values are not found during the conversion even if they are defined. #104
Comments
I'll test the file. |
Found that v3.1 converted OpenAPI document has the Thanks for bug reporting. I'll fix it ASAP. |
I had not checked the |
Thanks a lot! |
Succeeded to fix the bug, and would be published to |
Fix #104: conversion OpenAPI version when `allOf.length` is 1.
Upgrade to 2.0.1 version please. |
Related PR in `@samchon/openapi`: samchon/openapi#105
Fix samchon/openapi#104 in `migrate` and `editor`.
I feel like the To reproduce:
I've attached the result. You can see it sill has many |
I enhanced the test function about this issue by composing What is the problem point? Can you point a detailed accessor of it? If what you want is erasing const swagger: SwaggerV2.IDocument = {...};
const document: OpenApi.IDocument = OpenApi.convert(swagger);
const app: IHttpLlmApplication<"gemini"> = HttpLlm.application({
model: "gemini",
document,
});
TestValidator.equals("errors")(app.errors.length)(0); |
Thanks @samchon! That makes sense. Let me explain the feature I'm working on and hopefully get some insights from you. What I'm trying to do in my project:
The challenge is that I don't want to store the full So the solution I have right now is:
Seems like I can't erase |
Then collect only referenced components.schemas for each operation through For reference, due to recursive reference case, erasing $ref type is not always possible. https://github.com/samchon/openapi/blob/master/src/utils/OpenApiTypeChecker.ts |
Here is the LLM schema converter module, but may good to reference. https://github.com/samchon/openapi/blob/master/src/composers/llm/LlmSchemaV3_1Composer.ts |
Thanks! I'll take a look. |
The example swagger file.
Check the output of
OpenApi.convert(swagger).paths
, you can see there are still$ref
in it. Not sure if it's a bug or expected behavior.The text was updated successfully, but these errors were encountered: