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

Update with intake forms #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

mreigen
Copy link

@mreigen mreigen commented Aug 2, 2021

This is following @ayudemura 's work in https://gitlab.com/vendorful/app/-/merge_requests/2477

Creating examples for intake form public API GET and POST.

@@ -1,4 +1,5 @@
import fetch from "node-fetch";
import { TOKEN_ENDPOINT } from "./../api_urls.js";
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the primary purpose of this code is to serve as a document to communicate how to call the API, I think overt code is preferable, even if duplicative.

@@ -0,0 +1,6 @@
const API_VERSION = "v1";
Copy link
Contributor

Choose a reason for hiding this comment

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

The API versioning is per-module, so it will make more sense, I think, to include it as part of the opaque string that makes up the base url. It is very likely that the version numbers will increment differently for each API. The Auth API will likely never increment, but if we introduce a breaking change in the Vendor API, we would not need to increment all API versions nor deprecate URLs for other modules.

The TOKEN_ENDPOINT itself is a special case, as that is the name given in the OAuth2 specs, in that it is an opaque value to callers of the API that hopefully they would just paste into their OAuth2 client libraries that manage token expiration and renewal for them.

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.

3 participants