Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add probation teams API (and APIDocs) #56

Merged
merged 5 commits into from
Aug 18, 2020
Merged

Add probation teams API (and APIDocs) #56

merged 5 commits into from
Aug 18, 2020

Conversation

sldblog
Copy link
Contributor

@sldblog sldblog commented Aug 17, 2020

What does this pull request do?

Adds the https://github.com/ministryofjustice/probation-teams API to the model.

API docs

This pull request introduces the APIDocs class, which sets the Structurizr property api-docs-url. Please refer to the full details in ba50bf5.

What is the intent behind these changes?

To make sure we can discover all APIs from this repository.

Outstanding questions

  • Who uses this API (systems or people)
    • licences app
  • How do we link to API docs?
  • How do we make APIs easily discoverable in the model? (Tag? API.addTo(this)?)
    • I think the APIDocs object solves this -- anything with an API docs link is an API.

@sldblog sldblog requested a review from a team as a code owner August 17, 2020 10:08
@sldblog sldblog force-pushed the probation-team-api branch 3 times, most recently from e87a855 to 61c9d8a Compare August 17, 2020 14:01
The `APIDocs` class will set the Structurizr property called
`api-docs-url`.

The intent is to capture the "default" API docs URLs for C4 containers
that are exposing HMPPS-usable APIs. Later, it may be possible to pull
this information based on GitHub repository links, but for now, manual
fill seems appropriate.

The existence of this also allows for people to _search_ for `API` and
get results within the codebase -- if they'd like to find out what APIs
exist.
@sldblog sldblog changed the title Add probation teams API Add probation teams API (and APIDocs) Aug 18, 2020
Copy link
Contributor

@spikeheap spikeheap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this provides a nice, consistent interface to add API docs.

My gut reaction was: could we add this to our HMPPSSoftwareSystem interface, so it becomes an attribute of our object rather than a functional wrapper? Obviously that doesn't work in this case because we want to add API doc URLs to containers as well as systems, so is it highlighting the need for a container abstraction?

This does make me wonder:

  1. Should we be expanding our abstraction layer to include containers, and/or
  2. Is this a useful abstraction to push upstream?

It feels like we're unlikely to be the only users of this building additional tooling for this, and it'd be amazing if what we build here could end up helping other Structurizr/C4 developers.

Anyway, they're more grand thoughts than a review! This is spot-on while we consider the wider architecture, as it'll make identifying and refactoring API URLs much easier if/when we need to.

@sldblog
Copy link
Contributor Author

sldblog commented Aug 18, 2020

Thanks, Ryan! Good points -- I've extracted it to #58 for discussion 🙇‍♂️

@sldblog sldblog merged commit 2a0425b into main Aug 18, 2020
@sldblog sldblog deleted the probation-team-api branch August 18, 2020 16:07
@sldblog
Copy link
Contributor Author

sldblog commented Aug 18, 2020

🙇‍♂️ Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants