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

object schema properties should adhere to @JsonPropertyOrder and @XmlType(propOrder) #27

Closed
dmoebius opened this issue Dec 17, 2013 · 7 comments
Milestone

Comments

@dmoebius
Copy link

When creating a schema node for a class annotated with either @JsonPropertyOrder or @XmlType(propOrder = {...}) then the schema node should retain the specified order of properties.

Currently ObjectSchema contains HashMaps properties and patternProperties which garble the property order.

@cowtowncoder
Copy link
Member

Sounds reasonable. Pull request would be great, but sounds like this should be simple enough for developers to fix (with matching unit tests).

@mbknor
Copy link
Member

mbknor commented Apr 30, 2014

I'm also having issues with the ordering of the properties

@dagnelies
Copy link
Contributor

Same here. It would be nice to retain the properties order.

@heruan
Copy link

heruan commented Aug 27, 2015

This issue is pretty old, will it be addressed? Or there is another way to set the property order in the schema?

idelvall added a commit to idelvall/jackson-module-jsonSchema that referenced this issue Sep 1, 2015
idelvall added a commit to idelvall/jackson-module-jsonSchema that referenced this issue Sep 1, 2015
idelvall added a commit to idelvall/jackson-module-jsonSchema that referenced this issue Sep 1, 2015
@cowtowncoder
Copy link
Member

I don't think anyone is working on this issue. It would seem doable, if anyone has time and itch and willingness to help.

Having said that, how about I go and see if this could be solved by a trivial fix to use LinkedHashMap.

@cowtowncoder
Copy link
Member

Oh. Actually there is a contribution, PR #76 for this. I'll try to get that moving.

cowtowncoder added a commit that referenced this issue Sep 11, 2015
Make Object schema properties retain order (wrt @JsonPropertyOrder etc) (see #27)
@cowtowncoder cowtowncoder added this to the 2.6.2 milestone Sep 11, 2015
@cowtowncoder
Copy link
Member

Fixed, part of 2.6.2.

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

5 participants