Skip to content

Conversation

@provokateurin
Copy link
Member

No description provided.

@Leptopoda
Copy link
Member

Is this something we need immediately or just a nice to have?

As this isn't really openapi conformant I'd like to have this behind an option or specify custom types (see #749). In that case let's talk about it next week.

@provokateurin
Copy link
Member Author

I had this problem with the generated Talk spec, I don't remember exactly in what context this occurred 😅

@provokateurin
Copy link
Member Author

I remember what this was used for: Booleans in headers
We now have the problem that this is also present in the core of Nextcloud server, so we need to support this in some way.
As far as I can tell this has to be fully supported since headers are just a normal OpenAPI schema.
I'm not sure how to proceed with this 🤔

@provokateurin provokateurin force-pushed the feature/dynamite/decode-booleans branch from 0b5eb99 to 9b6f912 Compare September 23, 2023 08:10
@provokateurin
Copy link
Member Author

As far as I can tell this is expected behavior. https://swagger.io/docs/specification/describing-parameters has an example which encodes a boolean as literal true and https://github.com/stoplightio/elements (which Nextcloud uses to render the OpenAPI documentation) also does this when sending requests or generating code snippets.
The encoding part doesn't need to be updated because it already works ootb when calling toString() on a Dart boolean.

@provokateurin provokateurin mentioned this pull request Sep 23, 2023
Copy link
Member

@Leptopoda Leptopoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
It'll probably be changed a bit with the DynamiteRawResponse

@provokateurin provokateurin merged commit 5ebdb6f into main Sep 23, 2023
@provokateurin provokateurin deleted the feature/dynamite/decode-booleans branch September 23, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants