Add help text in README for creation, retrieval, listing of WorkItemTypes #195
Conversation
Hi @pranavgore09 . In principle I'd say this is a good thing to have in the README but we might want to inform the user about potential problems simply because of duplicate keys. The user can only create the |
yes @kwk you are right, updating.... |
f32f59e
to
8746362
Compare
Wondering if we should move to testable examples in the source code instead of writing everything up in the README. The README is getting quite large with light and deep setup info and other things. It looks like the project is super complicated, when really it's not. We could in the README just point to the examples folder, and in the example folder have testable examples (testable in the sense of being automatically tested and verified): https://blog.golang.org/examples ? |
goa-design supports example attribute for fields which will reflect in swagger. - doc |
@aslakknutsen @pranavgore09 or we could use those examples for tests with the final deploy image. |
|
||
---- | ||
$ ./bin/alm-cli create workitem --payload '{"type": "1" , "name": "some name", "fields": { "system.owner": "tmaeder", "system.state": "open" }}' -H localhost:8080 | ||
$ ./bin/alm-cli create workitem --payload '{"type": "Epic" , "name": "some name", "fields": { "system.owner": "tmaeder", "system.state": "open" }}' -H localhost:8080 |
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.
Epic? Epic is not available. And It looks like "system.state": "open" is not available either. Should be "new" instead. And "system.title" is missing?
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.
@alexeykazakov : yes you are right few keys are missing and have different values. But this is just an example data for creating WIT. With help of this dummy data, user can build n number of WITs with different possible values.
And I think somewhere else in the document we should teach the user about available (bootstrapped) WITs.
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.
Remove "name", it's no longer in API
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.
@alexeykazakov @pranavgore09 The WorkItem definition match the WorkitemType created further up, so not wrong in that sense. e.g. system.state is just a string.
@pranavgore09 If you add some text like: Based on the WorkItemType we created above, we can now create a WorkItem...
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.
Ah, ok. Makes sense now. Thanks for clarification.
@kwk : Yes but before that I want to understand - when we do |
8746362
to
7d8bdb5
Compare
7d8bdb5
to
eaf5cfb
Compare
Create a work item. | ||
Create a work item type. | ||
---- | ||
./bin/alm-cli create workitemtype --payload '{"extendedTypeName":null,"fields":{"system.owner":{"Type":{"Kind":"user"},"Required":true},"system.state":{"Type":{"Kind":"string"},"Required":false}},"name":"Epic"}' -H localhost:8080 --pp |
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.
Remove extendedTypeName
Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. README.adoc, line 265 [r1] (raw file):
|
eaf5cfb
to
ef4aa5c
Compare
README.adoc, line 265 [r1] (raw file):
|
ef4aa5c
to
8627c6b
Compare
Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. README.adoc, line 265 at r1 (raw file):
|
d353126
to
39ebd7b
Compare
7703f7f
to
7dee48d
Compare
Current coverage is 22.08% (diff: 100%)@@ master #195 diff @@
==========================================
Files 32 32
Lines 1173 1173
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 259 259
Misses 863 863
Partials 51 51
|
cc314ce
to
ee0f7cc
Compare
@aslakknutsen : this is a small doc change. I think it is ready to merge. Can you please take a look ? |
@pranavgore09 Can you rebase and re-push |
@pranavgore09 This does not fix #187 See https://github.com/almighty/almighty-core/blob/8a4a85c391d8bda112c3d86f2ca082d8dd10ae02/design/user_types.go#L24 for example |
ee0f7cc
to
2cc704e
Compare
Rebase done. |
taken from examples/workitemtype.adoc
Fixes #208
This change is