Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But their auto generated API clients don't have the invariant baked into them, which makes them very rough to use in say Rust.

They'll have something like this:

    MySchema:
      type: object
      properties:
        enum_member:   { enum: [foo, bar] }
        enum_member_2: { enum: [quz, qux] }
      if:   { properties: { enum_member: { const: bar } } }
      then: { required: [enum_member_2] }
Except, this is not defined in schemas, this is merely defined in prose around the documentation.

So your Rust API is full of Option, and it gets really annoying when you're testing things like say Bedrock, which takes 10 minutes, and then fails because what you submitted 10 minutes before doesn't match their schema.

I understand this can be fixed by reading the documentation in more detail, but it has gotten so verbose, and sometimes you just want to start something.

 help



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: