# |
Jul 5th 2018, 21:26 |
bravo-kernel |
Hope this is clear. If you have annotations to share I would appreciate it. :thumbsup: |
# |
Jul 5th 2018, 21:25 |
bravo-kernel |
This is not even mentioning the relationships that can exist which makes me wonder how you managed to solve that. |
# |
Jul 5th 2018, 21:22 |
bravo-kernel |
This is not JSON API and I would expect to see something similar to: ```json { "data": { "type": "cocktails", "id": "3", "attributes": { "name": "Mojito", "description": "Rum based", "created": "2015-04-11T09:52:01+00:00", "modified": null } ``` |
# |
Jul 5th 2018, 21:21 |
bravo-kernel |
File uploaded https://cakesf.slack.com/files/U157AT2ET/FBKFGT2E8/image.png / https://slack-files.com/T053DPNCM-FBKFGT2E8-983e12af4b |
# |
Jul 5th 2018, 21:20 |
bravo-kernel |
What does not work (for me) and what I was trying to point out is the `Example Value` which basically should display how the API should respond (circled in red below) |
# |
Jul 5th 2018, 21:18 |
bravo-kernel |
- the `Try it out!` button send the JSON API header and thus the response from crud-json-api is returned in JSON API (which makes total sense) |
# |
Jul 5th 2018, 21:18 |
bravo-kernel |
Results: |
# |
Jul 5th 2018, 21:18 |
bravo-kernel |
- opened the ui |
# |
Jul 5th 2018, 21:17 |
bravo-kernel |
- changed both `consumes` and `produces` to `application/vnd.api+json` (which makes it available in the dropdown selector) |
# |
Jul 5th 2018, 21:17 |
bravo-kernel |
- copied the sample annotations from the cakephp-swagger readme to one of my controllers |
# |
Jul 5th 2018, 21:10 |
bravo-kernel |
@james.phillips I added cakephp-swagger just to make sure I understand correctly. |
# |
Jul 5th 2018, 20:15 |
admad |
hmm sorry, it should work |
# |
Jul 5th 2018, 20:15 |
admad |
@rrd564 what you want isn't supported. Can only load files with templates from app's config/ |
# |
Jul 5th 2018, 20:11 |
admad |
that's already the default |
# |
Jul 5th 2018, 20:04 |
mikesmoniker |
Is there something I can put in my `test` data source config to make sqlite use an in-memory db? |
# |
Jul 5th 2018, 20:04 |
saeideng |
see ^^ |
# |
Jul 5th 2018, 20:04 |
saeideng |
https://book.cakephp.org/3.0/en/views/helpers/form.html#customizing-the-templates-formhelper-uses |
# |
Jul 5th 2018, 20:01 |
saeideng |
see core , probably you able to find your answer |
# |
Jul 5th 2018, 20:00 |
rrd564 |
I almost get what I want with this |
# |
Jul 5th 2018, 20:00 |
saeideng |
i did not test :( |
# |
Jul 5th 2018, 20:00 |
saeideng |
aha |
# |
Jul 5th 2018, 20:00 |
rrd564 |
But I added a template by a plugin |
# |
Jul 5th 2018, 20:00 |
rrd564 |
The form helper is the cake core FormHelper |
# |
Jul 5th 2018, 20:00 |
saeideng |
what you mean of templates? |
# |
Jul 5th 2018, 19:59 |
saeideng |
`loadHelper('pluginName.Form')` |
# |
Jul 5th 2018, 19:59 |
rrd564 |
should I use the dot notaton for the templates like here? |
# |
Jul 5th 2018, 19:58 |
rrd564 |
@saeideng `$this->loadHelper('Form', [ 'templates' => 'Datalist.form-templates', 'widgets' => [ 'datalist' => ['Datalist'] ] ]);` |
# |
Jul 5th 2018, 19:57 |
itmpls |
the read is in plugin/Sites/src/Model/Table/SitesTable.php* |
# |
Jul 5th 2018, 19:57 |
itmpls |
how come Configure::read('Sites.config'); doesnt read what I put in my plugins/Sites/config/bootstrap.php, Configure::write('Sites.config'); ? |
# |
Jul 5th 2018, 19:57 |
saeideng |
loadHelper('plugin.helper')` |
# |
Jul 5th 2018, 19:56 |
saeideng |
`plugin.helper` |
# |
Jul 5th 2018, 19:56 |
rrd564 |
How can I load form helper with a template coming from a plugin? |
# |
Jul 5th 2018, 19:52 |
bravo-kernel |
:face_palm: |
# |
Jul 5th 2018, 19:52 |
bravo-kernel |
(now) |
# |
Jul 5th 2018, 19:52 |
bravo-kernel |
and makes perfect sense too |
# |
Jul 5th 2018, 19:52 |
bravo-kernel |
over and over again, all 200s now |
# |
Jul 5th 2018, 19:52 |
bravo-kernel |
mr. @admad you are truly my virtual savior |
# |
Jul 5th 2018, 19:52 |
admad |
then your error is expected :slightly_smiling_face: |
# |
Jul 5th 2018, 19:51 |
bravo-kernel |
no AssetMiddleware in my `Application.php` yet if that is what you mean |
# |
Jul 5th 2018, 19:50 |
bravo-kernel |
the page at `http://my.api/alt3/swagger/` loads |
# |
Jul 5th 2018, 19:50 |
bravo-kernel |
the asset url is at least what I expect.. `http://my.api/alt3/swagger/css/screen.css` |