Skip to content
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

Adds the parameters to an operation #81

Merged
merged 24 commits into from
May 15, 2019
Merged

Adds the parameters to an operation #81

merged 24 commits into from
May 15, 2019

Conversation

fedefernandez
Copy link
Contributor

No description provided.

@pepegar
Copy link
Member

pepegar commented Apr 22, 2019

Hey! This looks like a needed addition, thanks Fede!

I think that, in the case of the parameter ADT, you want the occurrences of Json Schema types to be typed as A, not JsonSchemaF[A].

Sorry, I’m on my phone, but I’ll try to catch-up with this later on

BeniVF added 14 commits May 2, 2019 10:01
Modify operation encoder to use Encoder.instance(some recursion problem)
Reference should be part of JsonSchemaF.
Remove name from object in JsonSchemaF.
Extract jsonType method to generate Json.
Review the not required elements in the open api model.
Create a companion object in test to improve readability.
Refactor test helper function.
Verify codecRoundTrip law for Open Api Codecs.
Create an encoder for Fix.
Add circe-testing dependency.
@BeniVF BeniVF marked this pull request as ready for review May 10, 2019 08:46
Copy link
Member

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

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

Outstanding job @BeniVF . The code looks to me 👍

Copy link
Member

@pepegar pepegar left a comment

Choose a reason for hiding this comment

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

This is awesome @BeniVF, thank you very much for all your work here.

I have asked for some minor changes in the decoder part, in order to not specify the interface for decoders to Fix[JsonSchemaF], and allow any Embed[JsonSchemaF, A] to be used.

Apart of that, it looks very nice!

Copy link
Member

@pepegar pepegar left a comment

Choose a reason for hiding this comment

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

Great job mate!

Copy link

@diesalbla diesalbla left a comment

Choose a reason for hiding this comment

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

Code looks nice, at least for a first iteration.

I have a couple of suggestions, which can be addressed in follow-up PRs:

- requestBody in Operation is optional in Open api.
- format in string is open for users to define their own types.
- object in case you define properties the spec allows to avoid the field type
Use explicit method for Decoder[Option[Map[String, A]]]
Required is optional for Parameter.
@BeniVF BeniVF merged commit d9e07f4 into master May 15, 2019
@BeniVF BeniVF deleted the ff/open-api-decoders branch May 21, 2019 11:23
This was referenced Jul 10, 2019
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.

5 participants