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

Allow defining multiple keys #1568

Open
loligans opened this issue Oct 21, 2022 · 1 comment
Open

Allow defining multiple keys #1568

loligans opened this issue Oct 21, 2022 · 1 comment

Comments

@loligans
Copy link

I have an attribute class that I want to use for defining multiple extended data keys, but the IJsonSchemaExtensionDataAttribute only supports a single key.

MyCustomAttribute : Attribute, IJsonSchemaExtensionDataAttribute
{
    public MyCustomAttribute(string test1value, string test2value) {
        Keys = new [] {"x-key1", "x-key2"}
        Values = new [] {test1value, test2value}
    }
}

The result is the schema generates 2 extended fields:
"x-key1": "test1value",
"x-key2": "test2value"

@loligans
Copy link
Author

loligans commented Dec 3, 2022

I created a PR that opens an API up to developers to define attributes that allow multiple kvp's

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

Successfully merging a pull request may close this issue.

1 participant