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

Nested refs aren't resolved #270

Closed
sartymlg opened this issue Jul 20, 2016 · 6 comments
Closed

Nested refs aren't resolved #270

sartymlg opened this issue Jul 20, 2016 · 6 comments
Milestone

Comments

@sartymlg
Copy link

Hi, In my definition I have a lot of schemas, so I decided split them in multiples files, the problem arises when in an external file, there are another reference.

As example, I've split this file into this gist

After parse pets.yaml, only there are two definitions:

  • Pets
  • Error
    However Pet is not added into definition field, so codegen can't generate it.

I think there are two problems:

  • Resolve function isn't recursive
  • When a sub schema is loaded from a external file, actual genericRef is INTERNAL instead RELATIVE

PS: This issue is probably related with #229 and #147

@diegode
Copy link

diegode commented Jul 26, 2016

@sartymlg can you check if my PR fixes your issue?

@sartymlg
Copy link
Author

@diegode
Copy link

diegode commented Jul 28, 2016

@sartymlg can you create a pull request? I think we both did complementary things.

@fehguy fehguy closed this as completed in 8e70f7f Jul 28, 2016
@diegode
Copy link

diegode commented Jul 28, 2016

@fehguy this should be reopened, since there's still work to do (perhaps add master...TheWorkshopLabs:SD-133-code-generation-error-external-refs).

@fehguy fehguy reopened this Aug 3, 2016
@fehguy
Copy link
Contributor

fehguy commented Aug 3, 2016

@diegode I can create a PR, please take a look when you can

@diegode
Copy link

diegode commented Aug 30, 2016

@fehguy you can close this :)

@fehguy fehguy closed this as completed Oct 27, 2016
@fehguy fehguy modified the milestone: v1.0.23 Oct 28, 2016
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

3 participants