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

add connectionsHandler #53

Merged
merged 2 commits into from
Aug 14, 2020
Merged

add connectionsHandler #53

merged 2 commits into from
Aug 14, 2020

Conversation

cgardens
Copy link
Contributor

@cgardens cgardens commented Aug 13, 2020

What

  • add connectionsHandler
  • add support for parsing json files that have $ref. jackson does not support this by default.
  • API change: oneOfs don't seem to work as expected in java generation for openapi3 or jsonschema parsing. I was hoping for something like thrift or grpc where you had something like wrapperObject.isA(). instead it either just doesn't generate a usable object or generates an object with all of the fields. this is worth looking into more carefully, but for now, we just assume schedule is manual if it is null
  • issue discovered: json schema codegen is nesting enums as subclasses #52
  • issue discovered: Validation of configurations should happen before persistence #51

Note: I need to propagate the change in how to handle unit tests down to this PR. I will use mocks like was suggested in an earlier PR and will integrate that before I merge. I don't think you need to block reviewing on that.

@cgardens cgardens marked this pull request as ready for review August 14, 2020 01:33
import java.io.IOException;
import java.util.UUID;

public class SourceImplementationHelpers {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this file going to go away with the mocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the writeConfig part is. still using it the file to generate the struct which gets used in two different test classes.

return getConnectionInternal(connectionIdRequestBody.getConnectionId());
}

private StandardSync.Status toPersistenceStatus(ConnectionStatus apiStatus) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we have this conversion here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because the enums generated separately by open api 3 and json2pojo. so, even though they have the same values, the mapping has to be done explicitly to map back and forth between persistence and API structs. miss duck typing yet? 😉

Base automatically changed from cgardens/endpoints5 to master August 14, 2020 14:32
@cgardens cgardens merged commit f10fd25 into master Aug 14, 2020
@cgardens cgardens deleted the cgardens/endpoints6 branch August 14, 2020 15:16
marcosmarxm pushed a commit that referenced this pull request Jun 24, 2024
Fork Sync: Update from parent repository
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.

2 participants