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 v3/files endpoint #408

Closed
wants to merge 8 commits into from
Closed

Add v3/files endpoint #408

wants to merge 8 commits into from

Conversation

JakeChampion
Copy link
Contributor

@JakeChampion JakeChampion commented Dec 14, 2020

This adds the files endpoint to the version 3 of the API, which supports npm instead of bower (origami v2 components).

Differences from version 2 files endpoint:

  • version 2 only used uri path parameters for the api and not any query parameters (GET /v2/files/module@version/path whereas version 3 uses only query parameters and not path parameters (GET /v3/files?module=...&file=...&system_code=...)

  • version 3 requires a system_code query parameter to be present, which is the biz-ops system code for whatever is making the API call

  • version 3 uses the npm registry instead of the bower registry

Screenshot of the documentation -- https://origami-build-service-dev.herokuapp.com/v3/docs/api#get-v3-files
image

Screenshot of the migration notes --
image

@origamiserviceuser origamiserviceuser added this to incoming in Origami ✨ Dec 14, 2020
@github-actions github-actions bot added the service Relates to an Origami service label Dec 14, 2020
@JakeChampion JakeChampion marked this pull request as ready for review December 14, 2020 13:58
@JakeChampion JakeChampion requested a review from a team as a code owner December 14, 2020 13:58
@JakeChampion JakeChampion moved this from incoming to active in Origami ✨ Dec 14, 2020
@notlee
Copy link
Contributor

notlee commented Dec 15, 2020

Me and Jake discussed this:

  • The main usecase for this endpoint is to include font files from o-fonts-assets.
  • Other uses appear to be old component assets (file endpoint Splunk statistics).
  • No current component version includes assets in this way. None will in the same way going forward, as it will not work with npm. There's a proposal for handling component assets in the future.
  • If we require a system code to include fonts, and pass through the system code of the project consuming Origami, the client won't cache fonts between pages of the ft (pretty major, fonts are heavy)
  • Instead we decided it would be better to remove the file endpoint from v3 and host fonts in S3. We could do this just for o-fonts-assets in whatever way is easiest, or perhaps we go ahead and implement the asset proposal for all components?

Origami ✨ automation moved this from active to complete Dec 15, 2020
@notlee notlee added this to the npm milestone Dec 15, 2020
@JakeChampion JakeChampion deleted the v3-files branch August 11, 2021 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service Relates to an Origami service
Projects
Origami ✨
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants