You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Replace the URL by the entrypoint of your Hydra-enabled API
53
53
# Omit the resource flag to generate files for all resource types exposed by the API
54
54
@@ -89,34 +89,6 @@ ReactDom.render(
89
89
);
90
90
```
91
91
92
-
## Troubleshooting
93
-
* The generator does not perform any authentication, so you must ensure that all referenced hydra paths for your API are accessible anonymously. If you are using [API Platform](https://api-platform.com) this will at least include:
94
-
```
95
-
api_entrypoint ANY ANY ANY /{index}.{_format}
96
-
api_doc ANY ANY ANY /docs.{_format}
97
-
api_jsonld_context ANY ANY ANY /contexts/{shortName}.{_format}
98
-
```
99
-
100
-
* If you recieve `Error: The class http://www.w3.org/ns/hydra/core#ApiDocumentation doesn't exist.` you may have specified the documentation URL instead of the entrypoint. For example if you are using [API Platform](https://api-platform.com) and your documentation URL is at https://demo.api-platform.com/docs the entry point is likely at https://demo.api-platform.com/index.jsonld.
101
-
102
-
* If you receive `TypeError: Cannot read property '@type' of undefined` or `TypeError: Cannot read property '0' of undefined` check that the URL you specified is accessible and returns jsonld. You can check from the command line you are using by running something like `curl https://demo.api-platform.com/`.
103
-
104
-
* If you receive a message like this:
105
-
```
106
-
{ Error
107
-
at done (/usr/local/share/.config/yarn/global/node_modules/jsonld/js/jsonld.js:6851:19)
108
-
at <anonymous>
109
-
at process._tickCallback (internal/process/next_tick.js:188:7)
110
-
name: 'jsonld.InvalidUrl',
111
-
message: 'Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.',
Check access to the specified url, in this case `https://demo.api-platform.com/contexts/Entrypoint`, use curl to check access and the response `curl https://demo.api-platform.com/contexts/Entrypoint`. In the above case an "Access Denied" message in JSON format was being returned.
119
-
120
92
## TODO
121
93
122
94
* Add support for pagination
@@ -131,4 +103,4 @@ Check access to the specified url, in this case `https://demo.api-platform.com/c
131
103
132
104
## Credits
133
105
134
-
Created by [Kévin Dunglas](https://dunglas.fr). Sponsored by [Les-Tilleuls.coop](https://les-tilleuls.coop).
106
+
Created by [Kévin Dunglas](https://dunglas.fr). Sponsored by [Les-Tilleuls.coop](https://les-tilleuls.coop).
* The generator does not perform any authentication, so you must ensure that all referenced hydra paths for your API are accessible anonymously. If you are using [API Platform](https://api-platform.com) this will at least include:
4
+
```
5
+
api_entrypoint ANY ANY ANY /{index}.{_format}
6
+
api_doc ANY ANY ANY /docs.{_format}
7
+
api_jsonld_context ANY ANY ANY /contexts/{shortName}.{_format}
8
+
```
9
+
10
+
* If you recieve `Error: The class http://www.w3.org/ns/hydra/core#ApiDocumentation doesn't exist.` you may have specified the documentation URL instead of the entrypoint. For example if you are using [API Platform](https://api-platform.com) and your documentation URL is at [https://demo.api-platform.com/docs] the entry point is likely at [https://demo.api-platform.com]. You can see an example of the expected response from an entrypoint in your browser by clicking visiting [https://demo.api-platform.com/index.jsonld].
11
+
12
+
* If you receive `TypeError: Cannot read property '@type' of undefined` or `TypeError: Cannot read property '0' of undefined` check that the URL you specified is accessible and returns jsonld. You can check from the command line you are using by running something like `curl https://demo.api-platform.com/`.
13
+
14
+
* If you receive a message like this:
15
+
```
16
+
{ Error
17
+
at done (/usr/local/share/.config/yarn/global/node_modules/jsonld/js/jsonld.js:6851:19)
18
+
at <anonymous>
19
+
at process._tickCallback (internal/process/next_tick.js:188:7)
20
+
name: 'jsonld.InvalidUrl',
21
+
message: 'Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.',
Check access to the specified url, in this case `https://demo.api-platform.com/contexts/Entrypoint`, use curl to check access and the response `curl https://demo.api-platform.com/contexts/Entrypoint`. In the above case an "Access Denied" message in JSON format was being returned.
0 commit comments