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

Suboptimal generation on allOf with a single $ref #75

Open
woodruffw opened this issue Nov 6, 2023 · 1 comment · May be fixed by #76
Open

Suboptimal generation on allOf with a single $ref #75

woodruffw opened this issue Nov 6, 2023 · 1 comment · May be fixed by #76

Comments

@woodruffw
Copy link

To my interpretation, these forms within an object property are equivalent:

"some_prop": {
  "$ref": "#/definitions/SomeProp"
}

and:

"some_prop": {
  "allOf": [
    { "$ref": "#/definitions/SomeProp" }
  ]
}

however, Schemafy only generates some_prop: SomeProp for the first one: the second one receives a suboptimal production of some_prop: serde_json::Value.

This should be a relatively straightforward fix, so I'll look into it.

@woodruffw woodruffw linked a pull request Nov 7, 2023 that will close this issue
@woodruffw
Copy link
Author

I've opened #76 for this, and have confirmed that it generates the Rust models/property types that I expect.

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