-
Notifications
You must be signed in to change notification settings - Fork 70
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
Resolves #1074 - Update openapi.json bindings #1095
Conversation
Rebased to dev. |
Thanks for this. When I use openapi to generate the bindings, I get the following errors (repeated several times):
And when I then go into the directory and run
Note that it's just those two which are missing. Unfortunately I don't understand how the system works enough to be able to figure out why it can find (for instance) To run
Then I executed the following command:
|
Thanks for trying this. One point of clarification, if you start the simple http server, do the bindings generate or is it the same missing imports? |
Thanks for the quick response; unfortunately I don't really understand the question. If I don't use the webserver, and instead give it the file directly, then it doesn't work: it can't resolve the relative references. If I do use the webserver, then it no longer complains that it can't find the references; it manages to find the files, but there are exactly two definitions it claims not to be able to find. Lots of code is generated, including lots of structures, functions, tests, and documentation; but the tests don't run, because it seems to be missing those two structures. Let me know if you want me to record all the output in a snippet somewhere. |
Your answer helps me quite a bit. I'll do a bit of digging to see if I can fix the includes. I have an idea of what I can do. Thanks! |
@gwd I was able to reproduce the exact errors you mentioned. I pushed a fix that should fix the import warnings that were being created. I installed golang on my machine and tried to do a quick |
Sorry for the delay; I twice tried to respond to this issue and Yes, that gets rid of the "is not defined" warnings. I now get these warnings:
When I build, I get the errors below. (FYI the Go compiler automatically
Looking at the context of the first one: // MetricsInner struct for MetricsInner
type MetricsInner struct {
interface{} *interface{}
} This is gibberish. // try to unmarshal JSON data into interface{}
err = json.Unmarshal(data, &dst.interface{}); It's trying to use FWIW it looks like that code is present before #ef9c8e3; the change I thought it might have something to do with the fact that Golang
I think I tried to generate Python bindings on Monday too, and also had errors (IIRC). FWIW:
But I definitely don't understand much about the schemas, and haven't had time to dig into it. Did you mention that some other client bindings generator worked for I'm happy to try to continue testing it for you, but in the mean time I |
This at least makes the bindings more complete than before. Merging this and will capture remaining concerns in a separate ticket. |
Closes Issue #1074
Summary
Updated all put / post endpoints for /cve to update the openapi.json bindings / swagger docs.
Testing
Steps to manually test updated functionality, if possible