-
Notifications
You must be signed in to change notification settings - Fork 123
Add example how to test rest api on localhost #2746
Conversation
Thank you very much for improving the docu! Can you maybe use |
@markus2330 yes, no problem, will add either today evening or tomorrow. |
@markus2330 could you please help me and tell why some of the checks have failed? I just added changes to documentation and the new line to the changelog. Did I miss something? |
The markdown formatting check fails, see: https://build.libelektra.org/jenkins/blue/organizations/jenkins/libelektra/detail/PR-2746/2/pipeline/223 @sanssecours is there really no way to turn off code-formatting inside of Markdown? The suggested change for the JSON is ugly. |
You can disable the formatting using the tags
I think the problem here is that { If you use a fenced code block, then {
"exists": true,
"name": "test",
"path": "user/test",
"ls": ["user/test"],
"value": "5",
"meta": ""
} |
CODING.md does not mention that some code within Markdown also gets reformatted and it seems like that people do not expect this. Can you write the tip you gave here into CODING.md? (Btw. we should also consider to split up CODING.md. The instructions how to install the tools somehow do not belong there.) |
The coding guidelines already specify that you should use fences for code blocks: Lines 373 to 374 in a03fdfd
. |
yes, but in which cases code might be reformatted is not explained. Or is it not reformatted in fences and fences is the only allowed option? |
As far as I can tell,
. |
@markus2330 I updated the example with using curl and I used fenced code block to show the result of the request. |
@sanssecours can you maybe help out here? |
curl http://localhost:33333/kdb/user/test | ||
will return | ||
|
||
```json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the exact output from curl
? If it is, then please add the comment <!-- prettier-ignore-start -->
before the code block and <!-- prettier-ignore-end -->
after the code block. For an example, please take a look at the ReadMe of Yan LR:
libelektra/src/plugins/yanlr/README.md
Lines 228 to 234 in 733643d
<!-- prettier-ignore-start --> | |
```yaml | |
value | |
``` | |
<!-- prettier-ignore-end --> |
.
GET: http://localhost:33333/kdb/path | ||
|
||
will return the value of path key, which is stored in the database. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think part of an explanatory text is missing here. How about something like:
After you changed the value
user/test
with the commandkdb set user/test 5
, the command
curl http://localhost:33333/kdb/user/testwill return …
.
src/tools/web/README.md
Outdated
will return the value of path key, which is stored in the database. | ||
|
||
```sh | ||
kdb set /test 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to use user/test
instead of /test
here. This will make sure someone who reads this text does not have to know how cascading keys work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once #2561 is fixed this should be identical anyway.
Please see #2770 |
Basics
Check relevant points but please do not remove entries.
Do not describe the purpose of this PR in the PR description but:
doc/news/_preparation_next_release.md
which contains_(my name)_
)Please always add something to the the release notes.
(first line should have
module: short statement
syntax)close #X
, should be in the commit messages.Checklist
Check relevant points but please do not remove entries.
For docu fixes, spell checking, and similar none of these points below
need to be checked.
Review
Remove the line below and add the "work in progress" label if you do
not want the PR to be reviewed:
@markus2330 please review my pull request
Merging
Please add the "ready to merge" label when the build server and you say
that everything is ready to be merged.