Skip to content

Allow URLs as file source, including github API urls - #72

Draft
davidn wants to merge 1 commit into
gofoji:mainfrom
davidn:github-source
Draft

Allow URLs as file source, including github API urls#72
davidn wants to merge 1 commit into
gofoji:mainfrom
davidn:github-source

Conversation

@davidn

@davidn davidn commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Motivation: #71 allows generating API clients from an openapi spec, however it may not be desirable to vendor the openapi spec. An example use-case is if you have microservices in different github repos, you may not want to copy the api spec into every callee service.

Solution: foji.yaml can reference a URL instead of a local file. This also supportes "github files" which is a URL to the github API for fetching an individual file contents, to which foji will manage adding auth and accept headers. It is STRONGLY recommended to use a URL whose contents will not change, for example by embedding a tag into a github URL.

Motivation: gofoji#71 allows generating API
clients from an openapi spec, however it may not be desirable to
vendor the openapi spec. An example use-case is if you have
microservices in different github repos, you may not want to copy the
api spec into every callee service.

Solution: foji.yaml can reference a URL instead of a local file. This
also supportes "github files" which is a URL to the github API for
fetching an individual file contents, to which foji will manage adding
auth and accept headers.  It is *STRONGLY* recommended to use a URL
whose contents will not change, for example by embedding a tag into a
github URL.
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 2.77778% with 70 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@3c8c508). Learn more about missing BASE report.

Files with missing lines Patch % Lines
input/files.go 0.00% 70 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #72   +/-   ##
=======================================
  Coverage        ?   29.86%           
=======================================
  Files           ?       45           
  Lines           ?     2625           
  Branches        ?        0           
=======================================
  Hits            ?      784           
  Misses          ?     1832           
  Partials        ?        9           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant