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 option to select the DataAPI version #371

Closed
MichaelL79 opened this issue Dec 2, 2024 · 4 comments · Fixed by #372
Closed

Add option to select the DataAPI version #371

MichaelL79 opened this issue Dec 2, 2024 · 4 comments · Fixed by #372
Labels
data-api Pertaining to the Data API. enhancement New feature or request

Comments

@MichaelL79
Copy link
Contributor

It seems, that using v1 in the DataAPI URI causes problems when used with FileMaker 21. I'm not enirely sure that v1 / v2 / vLatest ist really the cause of the issue but at least it seems to be. In any case it would be great to select the version to be used when creating a new FileMakerRestClient. Even if this is not the cause of our problems, at least we could rule it out this way.

@fuzzzerd fuzzzerd added data-api Pertaining to the Data API. enhancement New feature or request labels Dec 2, 2024
@fuzzzerd
Copy link
Owner

fuzzzerd commented Dec 2, 2024

This would be an interesting feature for the future. As it stands right now there seem to be very few if any changes between v1 and v2 though official documentation is sparse.

If this is a feature you are interested in developing, I'd be glad to help guide you to getting a PR merged. Couple thoughts:

  • Class level "TargetVersion" enum variable. (starting enum options: v1, v2, vLatest)
  • Update the various Endpoint helper methods to use this variable to generate paths.
  • Additional constructor overload to allow specifying a target version.
  • Update existing constructors to set the default TargetVersion the same would be prior to this feature.

This approach would allow future features to be implemented (and eventually removed features to remain) by allowing the endpoint calculation to override the TargetVersion if the requested endpoint is less or greater than the target. Currently this isn't necessary but it allows for it into the future.

@MichaelL79
Copy link
Contributor Author

I cloned the repository and implemented the changes and tests. Would be great if you guide me through the PR process.

@fuzzzerd
Copy link
Owner

fuzzzerd commented Dec 6, 2024

I cloned the repository and implemented the changes and tests. Would be great if you guide me through the PR process.

That's great! Thank you. Generally, you'll want to Fork the repository, so that you can create a topic branch for the change, and then once you have committed that and synced it to your fork, you can submit a PR from your fork to this repository. Here's a couple GitHub links on these things:

Once you've got the PR created in this repository, I'll be glad to review and work with you to get ready to merge.

@fuzzzerd
Copy link
Owner

Implemented in #372.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-api Pertaining to the Data API. enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants