Bug 30385 - Standardize our swagger yaml spec files
Summary: Standardize our swagger yaml spec files
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 30536
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-28 14:48 UTC by Jonathan Druart
Modified: 2022-04-22 11:45 UTC (History)
2 users (show)

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


Attachments
Bug 30385: Standardize our swagger yaml spec files (407.23 KB, patch)
2022-04-08 10:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Script to generate (1.54 KB, patch)
2022-04-08 10:05 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-03-28 14:48:07 UTC
Quotes vs no quotes, keys order, etc.

We should load the file and dump them, and add a test to make sure we are not going to insert more inconsistencies.
Comment 1 Jonathan Druart 2022-04-08 10:04:39 UTC
Created attachment 133110 [details] [review]
Bug 30385: Standardize our swagger yaml spec files
Comment 2 Jonathan Druart 2022-04-08 10:05:19 UTC
Created attachment 133111 [details] [review]
Script to generate
Comment 3 Jonathan Druart 2022-04-08 10:06:07 UTC
Tomas, Martin, do we want that? If so it's now, it will be a nightmare to rebase.
Comment 4 Martin Renvoize 2022-04-11 14:18:28 UTC
I like consistency.. looks good to me :)
Comment 5 Jonathan Druart 2022-04-21 13:40:52 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2022-04-21 13:41:33 UTC
Now conflicting with bug 30536. No idea why the deps have been reversed. I am abandoning it as it's a mess to rebase and it wasn't supposed to wait that much in the queue.
Comment 7 Martin Renvoize 2022-04-21 14:21:45 UTC
I'm less sure about this now.. having delved through it I don't like how we re-order the keys within the parameters block..

We were pretty consistently as below:

parameters:
  - name: x-koha-embed
    in: header
    description: Embed list sent as request header
    required: false
    type: array
    items:
      enum:
        - extended_attributes
      type: string
    collectionFormat: csv

This now comes out as:

parameters:
    - collectionFormat: csv
      description: Embed list send as request header
      in: header
      items:
        enum:
          - extened_attributes
        type: string
      name: x-koha-embed
      required: false
      type: array

I find the second much harder to read at a glance.
Comment 8 Martin Renvoize 2022-04-21 14:22:46 UTC
That's why I reversed the dependencies.. because I felt there was still work to be done here.
Comment 9 Jonathan Druart 2022-04-22 11:45:55 UTC
I am failing at writing a script that will order the second (and more) level or keys. Help welcomed! :)
Might be a Friday effect.