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

IgnoreDataMember attribute is not honored #224

Description

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions