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] Fix accept header logic #4941

Open
catalinaperalta opened this issue Apr 8, 2024 · 0 comments
Open

[openapi to tsp] Fix accept header logic #4941

catalinaperalta opened this issue Apr 8, 2024 · 0 comments
Labels
openapi-to-tsp Tracks OpenAPI to Cadl converter issues

Comments

@catalinaperalta
Copy link
Member

Given the following swagger definition:

        "produces": [
          "application/vnd.microsoft.appconfig.kv+json",
          "application/problem+json"
        ],

The converter outputs the following typespec code where all of the supported content types are bundled into 1 string:

accept: "application/vnd.microsoft.appconfig.kv+json, application/problem+json";

The correct code should represent each content type individually:

accept: "application/vnd.microsoft.appconfig.kv+json" | "application/problem+json";

cc @joheredi

@catalinaperalta catalinaperalta added the openapi-to-tsp Tracks OpenAPI to Cadl converter issues label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openapi-to-tsp Tracks OpenAPI to Cadl converter issues
Projects
None yet
Development

No branches or pull requests

1 participant