-
Notifications
You must be signed in to change notification settings - Fork 36
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
Can not build API in GO using https://github.com/deepmap/oapi-codegen #35
Comments
Take a look at https://github.com/ogen-go/ogen - it looks like a more active and (maybe) better openapi generator for go. diff --git a/models/Cooldown.json b/models/Cooldown.json
index f10e582..abbc344 100644
--- a/models/Cooldown.json
+++ b/models/Cooldown.json
@@ -20,8 +20,7 @@
"expiration": {
"type": "string",
"format": "date-time",
- "description": "The date and time when the cooldown expires in ISO 8601 format",
- "minimum": 0
+ "description": "The date and time when the cooldown expires in ISO 8601 format"
}
},
"required": [
diff --git a/models/Survey.json b/models/Survey.json
index 7cd4f44..178ab48 100644
--- a/models/Survey.json
+++ b/models/Survey.json
@@ -22,8 +22,7 @@
"expiration": {
"type": "string",
"format": "date-time",
- "description": "The date and time when the survey expires. After this date and time, the survey will no longer be available for extraction.",
- "minimum": 0
+ "description": "The date and time when the survey expires. After this date and time, the survey will no longer be available for extraction."
},
"size": {
"type": "string", |
@ptxmac thanks for the suggestion. I'll take a look at it when I get some time. |
Thanks for bringing this up! I think other languages had similar issues with references. We'll update the docs with an example people in the community found: you can get the bundled export here from stoplight: |
Going to add some special notes to the docs about using the bundled reference. |
This |
I think we can remove these fields. Do we have any idea why the tooling doesn't support minimum 0? |
Guess it doesn't make sense to have a string of type dateTime have a minimum-value of 0. maybe it'd work if you give it a minimum value of a valid date string? But tbh I wouldn't bother and just remove it :) |
I think this is fixed - the only minimum properties now should be on integer types. Thanks again for following up on the reason why this was breaking. |
I am attempting to play with the API using golang, however trying to build types and the client are failing using oapi-codegen.
oapi-codegen/oapi-codegen#1045
It seems oapi-codegen requires fairly extensive mapping to be done for $ref's, and it does not like relative paths at all. I am posting this issue here in case anyone else in the community has managed to build the API for golang (either with oapi-codegen or some other tool) and can help me get started.
Otherwise, I'll have to resign myself to manually building a client API in go.
Thanks for any suggestions, thoughts, or ideas you might have in advance.
The text was updated successfully, but these errors were encountered: