Code Monkey home page Code Monkey logo

Comments (7)

space-admiral avatar space-admiral commented on July 21, 2024 1

Going to add some special notes to the docs about using the bundled reference.

from api-docs.

ptxmac avatar ptxmac commented on July 21, 2024

Take a look at https://github.com/ogen-go/ogen - it looks like a more active and (maybe) better openapi generator for go.
It still complains about a few problems in the spec, but that can be fixed by just removing a few (possible wrong?) fields:

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",

from api-docs.

awildeep avatar awildeep commented on July 21, 2024

@ptxmac thanks for the suggestion. I'll take a look at it when I get some time.

from api-docs.

space-admiral avatar space-admiral commented on July 21, 2024

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:
https://stoplight.io/api/v1/projects/spacetraders/spacetraders/nodes/reference/SpaceTraders.json?fromExportButton=true&snapshotType=http_service&deref=optimizedBundle

from api-docs.

FloWi avatar FloWi commented on July 21, 2024

This "minimum": 0 also caused problems using smithy-translate. After removing this entry the translation into a smithy-model worked.

from api-docs.

space-admiral avatar space-admiral commented on July 21, 2024

I think we can remove these fields. Do we have any idea why the tooling doesn't support minimum 0?

from api-docs.

FloWi avatar FloWi commented on July 21, 2024

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 :)

from api-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.