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

[openapi-to-tsp] Node 20 produce different output for openai spec #4795

Closed
Tracked by #72
timotheeguerin opened this issue Nov 15, 2023 · 4 comments
Closed
Tracked by #72
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Mgmt This issue is related to a management-plane library. openapi-to-tsp Tracks OpenAPI to Cadl converter issues

Comments

@timotheeguerin
Copy link
Member

AS part of upgrading dependencies and increaasing node versions noticed that in node 20 we get a different diff for openai spec. Some things become unknown


 model PathsMaorw9DeploymentsDeploymentIdCompletionsPostResponses200ContentApplicationJsonSchema {
   id?: string;
   object?: string;
@@ -189,7 +175,7 @@ model Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplica
 An input to embed, encoded as a string, a list of strings, or a list of token
 lists
 """)
-  input: PostContentSchemaInput;
+  input: unknown;
 
   @doc("The ID of the end-user, for use in tracking and rate-limiting.")
   user?: string;
@@ -201,9 +187,3 @@ lists
   @doc("ID of the model to use")
   `model`?: string;
 }
-
-@doc("""
-An input to embed, encoded as a string, a list of strings, or a list of token
-lists
-""")
-model PostContentSchemaInput {}

@timotheeguerin timotheeguerin added the openapi-to-tsp Tracks OpenAPI to Cadl converter issues label Nov 28, 2023
@tadelesh tadelesh added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 9, 2024
@joheredi
Copy link
Member

I can't reproduce this issue, here's what I did:

  • Pulled main from upstream
  • nvm use 20.8.1
  • rush update
  • cd packages/extensions/openapi-to-typespec
  • rush build -t.
  • rushx generate

But I don't see any diff and the converted TSP looks as expected
image

@ArthurMa1978 ArthurMa1978 added the Mgmt This issue is related to a management-plane library. label Jan 17, 2024
@joheredi
Copy link
Member

Closing as I haven't been able to reproduce with the latest Node 20 version

@tadelesh
Copy link
Member

my env with node v18.16.0 or node v20.11.0 all could reproduce this. no idea the root cause.

@tadelesh tadelesh reopened this Jan 24, 2024
@tadelesh
Copy link
Member

after upgrade core version and m4 version, this problem has been resolved. see: #4868.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Mgmt This issue is related to a management-plane library. openapi-to-tsp Tracks OpenAPI to Cadl converter issues
Projects
None yet
Development

No branches or pull requests

4 participants