Skip to content

Commit d631f7d

Browse files
authored
documentation (#15)
update
1 parent ccc228f commit d631f7d

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ ReactDom.render(
8989
);
9090
```
9191

92+
## [Troubleshooting](Troubleshooting.md)
93+
9294
## TODO
9395

9496
* Add support for pagination

Troubleshooting.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11

22
# Troubleshooting
33
* 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-
```
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+
```
99

1010
* 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].
1111

1212
* 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/`.
1313

1414
* If you receive a message like this:
15-
```
16-
{ Error
15+
```
16+
{ Error
1717
at done (/usr/local/share/.config/yarn/global/node_modules/jsonld/js/jsonld.js:6851:19)
1818
at <anonymous>
1919
at process._tickCallback (internal/process/next_tick.js:188:7)
@@ -23,6 +23,10 @@ api_jsonld_context ANY ANY ANY /c
2323
{ code: 'invalid remote context',
2424
url: 'https://demo.api-platform.com/contexts/Entrypoint',
2525
cause: null } }
26-
```
26+
```
2727

28-
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.
28+
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.
29+
30+
31+
## TODO
32+
* Custom endpoints issue

0 commit comments

Comments
 (0)