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

Missing definition #186

Closed
AdrianoAE opened this issue Aug 4, 2021 · 3 comments · Fixed by #246
Closed

Missing definition #186

AdrianoAE opened this issue Aug 4, 2021 · 3 comments · Fixed by #246
Labels
bug Something isn't working good first issue Good for newcomers oca-issue For participants from OSS Contribution Academy

Comments

@AdrianoAE
Copy link

AdrianoAE commented Aug 4, 2021

I'm using the version 0.7.2 and my response type is the following case:

public class Response
{
    public string Test { get; set; }
    public Test[] MyProperty { get; set; }
}

public class Test
{
    public int MyProperty { get; set; }
}

The schema for the Test class won't be generated becase of the property with the same name, if we change it to any other name it works as intended

Another problem is with generics

public class BaseResponse<T>
{
    public T Data { get; set; }
}

//using
[OpenApiResponseWithBody(..., bodyType: typeof(BaseResponse<List<Response>>))]

This generates a schema called "baseResponse_list`1" which is problematic with Azure APIM

@justinyoo
Copy link
Contributor

@AdrianoAE Thanks for the issue. Both are known issues.

  1. You know the workaround for the first one.
  2. We're trying to figure out the second issue. – no ETA though.

@justinyoo justinyoo added bug Something isn't working good first issue Good for newcomers labels Aug 12, 2021
@level120
Copy link
Contributor

I think it is related to #167
There is working on #218

@github-actions github-actions bot added the oca-issue For participants from OSS Contribution Academy label Sep 12, 2021
@justinyoo
Copy link
Contributor

It's slightly different from #167 and #218

This issue is about generic inside generic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers oca-issue For participants from OSS Contribution Academy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants