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

Property name alias #2262

Closed
bougar opened this issue Jun 12, 2020 · 3 comments
Closed

Property name alias #2262

bougar opened this issue Jun 12, 2020 · 3 comments

Comments

@bougar
Copy link

bougar commented Jun 12, 2020

Hello,
I would like to see in the specification any option alias a property with multiple names. Would it be possible in future releases of the specification?

Thanks in advance.

@MikeRalphson
Copy link
Member

Could you expand on your use-case / potential solution. It could be this is a duplicate of #2055

@bougar
Copy link
Author

bougar commented Jun 12, 2020

I would like to have any option to reference the property with other name. For example:

"type" : "object",
"properties" : {
     "name" : {
            "type" : "string",
            "aliases" : [
                  "alias"                   
            ]
     }
}

In this case "alias" field should be serialized as "name". This makes sense for me if I want to rename a property name without breaking compatibility with previous versions.
The behavior should be similar to JsonAlias in Java.

@MikeRalphson
Copy link
Member

This does very much sound like a duplicate of the other issue. Please continue the conversation there.

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

No branches or pull requests

2 participants