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

API: Fix #1531 #1542

Merged
merged 1 commit into from
Mar 5, 2024
Merged

API: Fix #1531 #1542

merged 1 commit into from
Mar 5, 2024

Conversation

datengraben
Copy link
Contributor

This needs to load a local file path and no remote path. Reverts commit 751b26a

@datengraben datengraben added bug Something isn't working quick issues with minor dependencies php Pull requests that update Php code module:API:GBFS Related to GBFS API Rest modules labels Mar 4, 2024
@datengraben datengraben added this to the 2.9.1 milestone Mar 4, 2024
@datengraben datengraben requested a review from hansmorb March 4, 2024 12:57
@datengraben datengraben linked an issue Mar 4, 2024 that may be closed by this pull request
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 45.69%. Comparing base (b3dde75) to head (308f6a7).
Report is 1 commits behind head on master.

Files Patch % Lines
src/API/BaseRoute.php 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1542   +/-   ##
=========================================
  Coverage     45.69%   45.69%           
+ Complexity     2562     2561    -1     
=========================================
  Files            93       93           
  Lines         10098    10098           
=========================================
  Hits           4614     4614           
  Misses         5484     5484           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@datengraben datengraben force-pushed the bugfix/issue-1531-gbfs-schema branch 2 times, most recently from 39717db to db9b09b Compare March 4, 2024 13:20
@hansmorb
Copy link
Contributor

hansmorb commented Mar 4, 2024

Hmm, bei mir klappt das noch nicht, ich kriege bei der wp-json/commonsbooking/v1/gbfs.json/schema Route einen

Uncaught Exception: Could not retrieve schema json from /home/hansm/localsites/cbtest/app/public/wp-content/plugins/commonsbooking/includes/gbfs-json-schema/gbfs.json
in /home/hansm/localsites/cbtest/app/public/wp-content/plugins/commonsbooking/src/API/BaseRoute.php on line 141<

Fehler

This needs to load a local file path and no remote path.
Reverts commit 751b26a
But leaves new exception for troubleshooting purposes, when file_get_contents returns false.
@datengraben datengraben force-pushed the bugfix/issue-1531-gbfs-schema branch from db9b09b to 308f6a7 Compare March 4, 2024 20:21
@datengraben
Copy link
Contributor Author

datengraben commented Mar 4, 2024

@hansmorb ok es funktioniert bei mir. Hatte sich ein ! $schemaArray anstatt $schemaArray eingeschlichen.

@datengraben
Copy link
Contributor Author

@hansmorb Ich weiß nicht wie du es testest, mit dieser URL struktur kannst du auf jeden Fall REST-Routen lokal testen (falls du kein Rewrite konfiguriert hast).

http://localhost:1000/index.php?rest_route=/commonsbooking/v1/locations

@hansmorb
Copy link
Contributor

hansmorb commented Mar 4, 2024

Jetzt funktioniert das auch bei mir. Ich nutze zum Entwickeln Local by Flywheel

@datengraben datengraben merged commit 44e6136 into master Mar 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:API:GBFS Related to GBFS API Rest modules php Pull requests that update Php code quick issues with minor dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GBFS Schema kann nicht abgerufen werden
2 participants