foreman-documentation icon indicating copy to clipboard operation
foreman-documentation copied to clipboard

Modularize Foreman API guide

Open maximiliankolb opened this issue 4 months ago • 1 comments

What changes are you introducing?

  • Modularize content in guides/common/modules related to the Foreman API guide
  • Unifying anchors: Is a original effort by Lena to bring the Foreman API guide upstream, we briefly discussed to way to set anchors. If I remember correctly, we though about using the api- prefix similar to the cli- prefix for CLI procedures. I consider this to have value on its own; and allow for a smoother transition in case we ever decide that we want to also show the API procedure as part of "normal aka. WebUI-based" workflows.
  • Using long options for commands (mostly curl) to provide better readability
  • Using one argument per line to also simplify readability

Why are you introducing these changes? (Explanation, links to references, issues, etc.)

mostly to improve maintainability by splitting content into smaller modules. to align with existing content; help downstream integration; to prepare for the eventual merge with WebUI related procedures.

Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)

  • Refs https://github.com/theforeman/foreman-documentation/pull/3212/files#r1746164481
  • I would like your opinion on "=" vs "." headings. If we have a consensus, I'd be happy to implement this as part of this PR.
  • Do we want to keep --request GET for curl commands? It's the default HTTP method and the command would also work without.
  • Do we want to use single or double quotes for quotes commands? I did not yet actively try to unify this but would if someone makes a proposal and is willing to review :smiley:

Checklists

  • [x] I am okay with my commits getting squashed when you merge this PR.
  • [x] I am familiar with the contributing guidelines.

Please cherry-pick my commits into:

  • [ ] Foreman 3.12/Katello 4.14 (Satellite 6.16)
  • [ ] Foreman 3.11/Katello 4.13
  • [ ] Foreman 3.10/Katello 4.12
  • [ ] Foreman 3.9/Katello 4.11 (Satellite 6.15; orcharhino 6.8/6.9/6.10)
  • [ ] Foreman 3.8/Katello 4.10
  • [ ] Foreman 3.7/Katello 4.9 (Satellite 6.14)
  • [ ] Foreman 3.6/Katello 4.8
  • [ ] Foreman 3.5/Katello 4.7 (Satellite 6.13; orcharhino 6.6/6.7)
  • We do not accept PRs for Foreman older than 3.5.

maximiliankolb avatar Oct 07 '24 12:10 maximiliankolb