-
Notifications
You must be signed in to change notification settings - Fork 6k
[All] Still having a problem generating code w/ latest parser + external ref's #4103
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
Comments
@fehguy I was hoping your parser update to 1.0.23-SNAPSHOT would help but it still produces the issue above - 1.0.19 was the last version of the parser that worked for me. Is everything valid with my json definitions above? |
@jaz-ah it looks valid--are you sure you're testing from master on swagger-codegen to pick up the correct parser? |
@fehguy yup definitely - here is the bottom of pom.xml from latest master that i'm using:
|
same happens w/ swift and android languages... |
OK I have reproduced this. Looks like the issue is having relative definitions in a remote path reference, which isn't something that was tested in 1.0.23 of the parser. I'll open a new issue and hopefully it's another easy fix. PS you have |
no problem thx @fehguy |
Hi @jaz-ah I think this is fixed. Please pull master, which grabs swagger-parser-1.0.24-SNAPSHOT. Your test files generate and compile fine now. |
ok i'll give it a try in a minute - thx! |
great, thanks |
hmm.. @fehguy for some reason i checked out master, verified pom.xml is using 1.0.24-SNAPSHOT, rebuilt and I still see the same problem... i cleaned/etc... then tried switching pom.xml to 1.0.19 and verified the problem went away... is snapshot definitely updated to the latest fix? |
I've redeployed the snapshot. Can you run |
@fehguy ok did that, tried again and same issue... import Foundation public typealias BarData = are you getting the same for BarData.swift if you generate swift3? |
Here's my output:
I built it like this (serving your test files on localhost:8000):
|
@fehguy the difference is I'm not serving test files on my localhost, I'm referencing them directly: java -jar ./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i ../activehours_apis-jaz/spec-server/public/specs/FooAPI.json -o test -l swift3 would this make a difference? |
@jaz-ah do you work at Active Hours? If so, our office is 1/2 block from you and we can probably sort this out in person :) It works fine from file-system for me:
|
@fehguy yup I do - where are you @? |
437 kipling 2nd floor. If you want to come by, we can work this out in person |
I believe this has been addressed. Please reply to let us know if that's not the case. |
Uh oh!
There was an error while loading. Please reload this page.
Description
When I use a json schema with external file references, ever since the swagger parser was moved up from 1.0.19, I get empty models throughout my generated code.
Swagger-codegen version
Trying latest code from @fehguy 's update to parser.
Swagger declaration file content or url
I tried simplifying this down to an easy reproducible problem -
FooAPI.json:
Bar.json:
when running this in swift3 for example, the output for BarData.swift looks like:
and the output of BarSettingsRequest.swift is:
whereas with the 1.0.19 parser, I get :
BarData.swift:
BarSettingsRequest.swift:
The text was updated successfully, but these errors were encountered: