Bug 34387 - API docs tags missing descriptions
Summary: API docs tags missing descriptions
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Katrin Fischer
URL:
Keywords: rel_22_11_candidate, rel_23_05_candidate
: 34278 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-07-25 17:50 UTC by Tomás Cohen Arazi
Modified: 2023-12-28 20:46 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.03,22.11.09


Attachments
Bug 34387: Improve API docs naming consistency (17.01 KB, patch)
2023-07-25 19:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 34387: Improve API docs naming consistency (17.05 KB, patch)
2023-07-26 06:46 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 34387: (follow-up) Minor spelling and quoting fixes (2.58 KB, patch)
2023-07-26 06:46 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 34387: Improve API docs naming consistency (17.05 KB, patch)
2023-07-29 21:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34387: (follow-up) Minor spelling and quoting fixes (2.63 KB, patch)
2023-07-29 21:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34387: (QA follow-up) Fix disply of 'Import batches' (1.66 KB, patch)
2023-07-29 21:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
[23.05.x] Bug 34387: Improve API docs naming consistency (16.48 KB, patch)
2023-07-31 12:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[23.05.x] Bug 34387: (follow-up) Minor spelling and quoting fixes (2.70 KB, patch)
2023-07-31 12:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[23.05.x] Bug 34387: (QA follow-up) Fix disply of 'Import batches' (1.73 KB, patch)
2023-07-31 12:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[22.11.x] Bug 34387: Improve API docs naming consistency (15.87 KB, patch)
2023-07-31 12:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[22.11.x] Bug 34387: (follow-up) Minor spelling and quoting fixes (2.70 KB, patch)
2023-07-31 12:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[22.11.x] Bug 34387: (QA follow-up) Fix disply of 'Import batches' (1.73 KB, patch)
2023-07-31 12:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[23.05.x] Bug 34387: (QA follow-up) Fix display of 'Import batches' (999 bytes, patch)
2023-08-15 08:33 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[22.11.x] Bug 34387: (QA follow-up) Fix display of 'Import batches' (999 bytes, patch)
2023-08-15 08:36 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2023-07-25 17:50:59 UTC
It is easy to spot the issue by entering [here](https://api.koha-community.org/Development.html).

On the left column, some tags are nicely translated into descriptions (e.g. 'SMTP servers') and some others are not (e.g. 'search_filters').

We need to solve it, and enforce it at QA.
Comment 1 Tomás Cohen Arazi 2023-07-25 19:09:00 UTC
Created attachment 153891 [details] [review]
Bug 34387: Improve API docs naming consistency

This patch aims to make our API docs be more consistent.
It addresses two particular things:

* There's no consistency on the `tags` used across the spec, and not all
  of them are correctly described and have an `x-displayName` entry.
  More on this later.
* This are not sorted either by some for of grouping, or at least
  alphabetically.

For the former, I did my best trying to harmonize (specially on the ERM
front) with what we do in the rest of the use cases.

For the latter, I opted for sorting everything alphabetically, as a
first step. Hoping someone else could work on grouping things.

To test (ON YOUR HOST MACHINE):
1. On current master run:
   $ cd api/v1/swagger
   $ docker run --rm -v $(pwd):/api --workdir /api redocly/cli \
           build-docs swagger.yaml --output index.html
=> SUCCESS: It doesn't break or anything
2. Open your browser, open the generated api/v1/swagger/index.html file
=> FAIL: The left column has
         * several lower case entries
         * not everything is correctly grouped (ERM? packages?)
         * Things are not sorted. There's an attempt but looks messy
3. Apply this patch
4. Repeat 1 and 2
=> SUCCESS: Things look much better!
5. Sign off :-D

CAVEAT1: I'm not sure why, but import_batches doesn't work. Ideas are
welcome, I'll keep looking for fixes.
CAVEAT2: I don't have enough eHoldings background to weight in, but I
feel like 'ERM eHoldings packages' could just be 'ERM packages'.
Follw-up patches with better ideas are welcome.
CAVEAT3: Patron credits, debits, balance... They could all go in to
'Patrons accounts' or similar. Open to ideas.
CAVEAT4: Old redocly didn't support mapping an endpoint to more than one
target section. Something to explore if we want (for example) to reach
'credits' through the 'Patrons' section but also from 'Accounting'.
Comment 2 Martin Renvoize 2023-07-26 06:46:08 UTC
Created attachment 153894 [details] [review]
Bug 34387: Improve API docs naming consistency

This patch aims to make our API docs be more consistent.
It addresses two particular things:

* There's no consistency on the `tags` used across the spec, and not all
  of them are correctly described and have an `x-displayName` entry.
  More on this later.
* This are not sorted either by some for of grouping, or at least
  alphabetically.

For the former, I did my best trying to harmonize (specially on the ERM
front) with what we do in the rest of the use cases.

For the latter, I opted for sorting everything alphabetically, as a
first step. Hoping someone else could work on grouping things.

To test (ON YOUR HOST MACHINE):
1. On current master run:
   $ cd api/v1/swagger
   $ docker run --rm -v $(pwd):/api --workdir /api redocly/cli \
           build-docs swagger.yaml --output index.html
=> SUCCESS: It doesn't break or anything
2. Open your browser, open the generated api/v1/swagger/index.html file
=> FAIL: The left column has
         * several lower case entries
         * not everything is correctly grouped (ERM? packages?)
         * Things are not sorted. There's an attempt but looks messy
3. Apply this patch
4. Repeat 1 and 2
=> SUCCESS: Things look much better!
5. Sign off :-D

CAVEAT1: I'm not sure why, but import_batches doesn't work. Ideas are
welcome, I'll keep looking for fixes.
CAVEAT2: I don't have enough eHoldings background to weight in, but I
feel like 'ERM eHoldings packages' could just be 'ERM packages'.
Follw-up patches with better ideas are welcome.
CAVEAT3: Patron credits, debits, balance... They could all go in to
'Patrons accounts' or similar. Open to ideas.
CAVEAT4: Old redocly didn't support mapping an endpoint to more than one
target section. Something to explore if we want (for example) to reach
'credits' through the 'Patrons' section but also from 'Accounting'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2023-07-26 06:46:11 UTC
Created attachment 153895 [details] [review]
Bug 34387: (follow-up) Minor spelling and quoting fixes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2023-07-26 06:47:06 UTC
*** Bug 34278 has been marked as a duplicate of this bug. ***
Comment 5 Martin Renvoize 2023-07-26 06:50:34 UTC
This is a great improvement..

* I couldn't work out why import_batches isn't working either.. very strange.
* I'll ask Matt/Jonathan to comment on the ERM stuff
* I'd love to see us use grouping later, but I don't think our redocly versions support it yet (and likely it'll all work better with the next swagger too)
* The patron accounting endpoints feel like they need some cleaning up.. they're not all that consistent right now.

All in all, I think this is a great starting point.. we should probably add some qa rules and accompanying tools around ensuring tagging takes place going forward.

I think we should probably go with what's here for now and keep refining in other bugs.
Comment 6 Katrin Fischer 2023-07-29 21:17:14 UTC
Created attachment 154065 [details] [review]
Bug 34387: Improve API docs naming consistency

This patch aims to make our API docs be more consistent.
It addresses two particular things:

* There's no consistency on the `tags` used across the spec, and not all
  of them are correctly described and have an `x-displayName` entry.
  More on this later.
* This are not sorted either by some for of grouping, or at least
  alphabetically.

For the former, I did my best trying to harmonize (specially on the ERM
front) with what we do in the rest of the use cases.

For the latter, I opted for sorting everything alphabetically, as a
first step. Hoping someone else could work on grouping things.

To test (ON YOUR HOST MACHINE):
1. On current master run:
   $ cd api/v1/swagger
   $ docker run --rm -v $(pwd):/api --workdir /api redocly/cli \
           build-docs swagger.yaml --output index.html
=> SUCCESS: It doesn't break or anything
2. Open your browser, open the generated api/v1/swagger/index.html file
=> FAIL: The left column has
         * several lower case entries
         * not everything is correctly grouped (ERM? packages?)
         * Things are not sorted. There's an attempt but looks messy
3. Apply this patch
4. Repeat 1 and 2
=> SUCCESS: Things look much better!
5. Sign off :-D

CAVEAT1: I'm not sure why, but import_batches doesn't work. Ideas are
welcome, I'll keep looking for fixes.
CAVEAT2: I don't have enough eHoldings background to weight in, but I
feel like 'ERM eHoldings packages' could just be 'ERM packages'.
Follw-up patches with better ideas are welcome.
CAVEAT3: Patron credits, debits, balance... They could all go in to
'Patrons accounts' or similar. Open to ideas.
CAVEAT4: Old redocly didn't support mapping an endpoint to more than one
target section. Something to explore if we want (for example) to reach
'credits' through the 'Patrons' section but also from 'Accounting'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Katrin Fischer 2023-07-29 21:17:17 UTC
Created attachment 154066 [details] [review]
Bug 34387: (follow-up) Minor spelling and quoting fixes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2023-07-29 21:17:20 UTC
Created attachment 154067 [details] [review]
Bug 34387: (QA follow-up) Fix disply of 'Import batches'

Fixes the heading and sidebar display of the 'Import batches'
section.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Tomás Cohen Arazi 2023-07-29 22:14:16 UTC
(In reply to Katrin Fischer from comment #8)
> Created attachment 154067 [details] [review] [review]
> Bug 34387: (QA follow-up) Fix disply of 'Import batches'
> 
> Fixes the heading and sidebar display of the 'Import batches'
> section.
> 
> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Thanks!
Comment 10 Tomás Cohen Arazi 2023-07-31 12:44:34 UTC
Created attachment 154087 [details] [review]
[23.05.x] Bug 34387: Improve API docs naming consistency

This patch aims to make our API docs be more consistent.
It addresses two particular things:

* There's no consistency on the `tags` used across the spec, and not all
  of them are correctly described and have an `x-displayName` entry.
  More on this later.
* This are not sorted either by some for of grouping, or at least
  alphabetically.

For the former, I did my best trying to harmonize (specially on the ERM
front) with what we do in the rest of the use cases.

For the latter, I opted for sorting everything alphabetically, as a
first step. Hoping someone else could work on grouping things.

To test (ON YOUR HOST MACHINE):
1. On current master run:
   $ cd api/v1/swagger
   $ docker run --rm -v $(pwd):/api --workdir /api redocly/cli \
           build-docs swagger.yaml --output index.html
=> SUCCESS: It doesn't break or anything
2. Open your browser, open the generated api/v1/swagger/index.html file
=> FAIL: The left column has
         * several lower case entries
         * not everything is correctly grouped (ERM? packages?)
         * Things are not sorted. There's an attempt but looks messy
3. Apply this patch
4. Repeat 1 and 2
=> SUCCESS: Things look much better!
5. Sign off :-D

CAVEAT1: I'm not sure why, but import_batches doesn't work. Ideas are
welcome, I'll keep looking for fixes.
CAVEAT2: I don't have enough eHoldings background to weight in, but I
feel like 'ERM eHoldings packages' could just be 'ERM packages'.
Follw-up patches with better ideas are welcome.
CAVEAT3: Patron credits, debits, balance... They could all go in to
'Patrons accounts' or similar. Open to ideas.
CAVEAT4: Old redocly didn't support mapping an endpoint to more than one
target section. Something to explore if we want (for example) to reach
'credits' through the 'Patrons' section but also from 'Accounting'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Tomás Cohen Arazi 2023-07-31 12:44:37 UTC
Created attachment 154088 [details] [review]
[23.05.x] Bug 34387: (follow-up) Minor spelling and quoting fixes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 12 Tomás Cohen Arazi 2023-07-31 12:44:40 UTC
Created attachment 154089 [details] [review]
[23.05.x] Bug 34387: (QA follow-up) Fix disply of 'Import batches'

Fixes the heading and sidebar display of the 'Import batches'
section.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Tomás Cohen Arazi 2023-07-31 12:50:24 UTC
Created attachment 154090 [details] [review]
[22.11.x] Bug 34387: Improve API docs naming consistency

This patch aims to make our API docs be more consistent.
It addresses two particular things:

* There's no consistency on the `tags` used across the spec, and not all
  of them are correctly described and have an `x-displayName` entry.
  More on this later.
* This are not sorted either by some for of grouping, or at least
  alphabetically.

For the former, I did my best trying to harmonize (specially on the ERM
front) with what we do in the rest of the use cases.

For the latter, I opted for sorting everything alphabetically, as a
first step. Hoping someone else could work on grouping things.

To test (ON YOUR HOST MACHINE):
1. On current master run:
   $ cd api/v1/swagger
   $ docker run --rm -v $(pwd):/api --workdir /api redocly/cli \
           build-docs swagger.yaml --output index.html
=> SUCCESS: It doesn't break or anything
2. Open your browser, open the generated api/v1/swagger/index.html file
=> FAIL: The left column has
         * several lower case entries
         * not everything is correctly grouped (ERM? packages?)
         * Things are not sorted. There's an attempt but looks messy
3. Apply this patch
4. Repeat 1 and 2
=> SUCCESS: Things look much better!
5. Sign off :-D

CAVEAT1: I'm not sure why, but import_batches doesn't work. Ideas are
welcome, I'll keep looking for fixes.
CAVEAT2: I don't have enough eHoldings background to weight in, but I
feel like 'ERM eHoldings packages' could just be 'ERM packages'.
Follw-up patches with better ideas are welcome.
CAVEAT3: Patron credits, debits, balance... They could all go in to
'Patrons accounts' or similar. Open to ideas.
CAVEAT4: Old redocly didn't support mapping an endpoint to more than one
target section. Something to explore if we want (for example) to reach
'credits' through the 'Patrons' section but also from 'Accounting'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 14 Tomás Cohen Arazi 2023-07-31 12:50:27 UTC
Created attachment 154091 [details] [review]
[22.11.x] Bug 34387: (follow-up) Minor spelling and quoting fixes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 15 Tomás Cohen Arazi 2023-07-31 12:50:30 UTC
Created attachment 154092 [details] [review]
[22.11.x] Bug 34387: (QA follow-up) Fix disply of 'Import batches'

Fixes the heading and sidebar display of the 'Import batches'
section.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 16 Tomás Cohen Arazi 2023-07-31 12:51:54 UTC
I have attached adapted versions for 23.05 and 22.11. I kept the 3 patches to keep the attribution.
Comment 17 Tomás Cohen Arazi 2023-07-31 12:55:09 UTC
Thanks Martin and Katrina for testings and the follow-ups.
Comment 18 Tomás Cohen Arazi 2023-08-15 08:24:57 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 19 Tomás Cohen Arazi 2023-08-15 08:33:48 UTC
Created attachment 154419 [details] [review]
[23.05.x] Bug 34387: (QA follow-up) Fix display of 'Import batches'

Fixes the heading and sidebar display of the 'Import batches'
section.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 20 Tomás Cohen Arazi 2023-08-15 08:36:58 UTC
Created attachment 154420 [details] [review]
[22.11.x] Bug 34387: (QA follow-up) Fix display of 'Import batches'

Fixes the heading and sidebar display of the 'Import batches'
section.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 21 Tomás Cohen Arazi 2023-08-15 08:41:57 UTC
@Rmaints make sure you pick all the patches for your version. I had to amend the last follow-up for an unintended breakage it introduced, and they ended up stacked at the bottom.
Comment 22 Fridolin Somers 2023-08-17 18:41:45 UTC
Pushed to 23.05.x for 23.05.03
Comment 23 Pedro Amorim 2023-08-18 13:51:29 UTC
Nice work everyone!

Pushed to 22.11.x for next release