Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

IgnoreDataMember attribute is not honored #224

Open
alexeygrantmyob opened this issue Oct 3, 2019 · 0 comments
Open

IgnoreDataMember attribute is not honored #224

alexeygrantmyob opened this issue Oct 3, 2019 · 0 comments

Comments

@alexeygrantmyob
Copy link

alexeygrantmyob commented Oct 3, 2019

The contract XXXX I am using for my API has two similar properties - "IntProperty" and "StringProperty". IntProperty has IgnoreDataMemberAttribute does not have DataMember attribute. StringProperty has an attribute DataMember(Name = "IntProperty").
When trying to generate the OpenAPI documentation from that contract I get the following error:

Adding schema "XXXX" to the schema reference registry failed with the error: Adding schema "XXXX" to the schema reference registry failed with the error: Adding schema "XXXX" to the schema reference registry failed with the error: Adding schema "XXXX" to
the schema reference registry failed with the error: A property with the name "IntProperty" already exists on "XXXX".

So it looks like that the parser ignores IgnoreDataMemberAttribute, and tries to add IntProperty (one from IntProperty and another one from StringProperty) twice and fails there.

Is it an expected behavior, and if yes, what's the workaround?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant