Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/download-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function processV2Openapi(schema: any): any {

export async function downloadV2Openapi() {
const src =
"https://raw.githubusercontent.com/portone-io/public-api-service/main/schema/openapi.yml";
"https://raw.githubusercontent.com/portone-io/public-api-service/feat/b2b-public-api/schema/openapi.yml";

Choose a reason for hiding this comment

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

medium

The src URL for the OpenAPI schema now points to the feat/b2b-public-api branch. While this is perfectly fine for QA activities specific to this feature branch, could you clarify the plan for this URL when these script changes are considered for merging into more permanent branches like main or develop?

Hardcoding feature branch URLs can lead to fetching outdated or incorrect schemas if the feature branch is later deleted or becomes stale. To mitigate this, would it be helpful to add a TODO comment here as a reminder to revert to the main branch URL or to make this URL configurable before any merge into a long-lived branch? For example:

// TODO(QA): Revert to 'main' branch URL or make configurable before merging to main/develop.
const src =
  "https://raw.githubusercontent.com/portone-io/public-api-service/feat/b2b-public-api/schema/openapi.yml";

const jsonDst = import.meta.resolve("../src/schema/v2.openapi.json");
const yamlDst = import.meta.resolve("../src/schema/v2.openapi.yml");
const token = await ensureLoggedIn();
Expand Down Expand Up @@ -151,7 +151,7 @@ export async function downloadV2Openapi() {

export async function downloadV2Graphql() {
const src =
"https://raw.githubusercontent.com/portone-io/public-api-service/main/schema/schema.graphql";
"https://raw.githubusercontent.com/portone-io/public-api-service/feat/b2b-public-api/schema/schema.graphql";

Choose a reason for hiding this comment

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

medium

Similarly, the src URL for the GraphQL schema is also updated to point to the feat/b2b-public-api branch. The same considerations apply here as for the OpenAPI schema URL.

To ensure the script remains robust and fetches the correct schema in different contexts (e.g., after this QA phase or if merged into main), what's the strategy for managing this feature-specific URL? A TODO comment or a plan to revert/configure this URL would be beneficial to prevent accidental use of a feature-branch schema in production or main development lines.

const dst = import.meta.resolve("../src/schema/v2.graphql");
const token = await ensureLoggedIn();
console.log(`스키마 위치: ${src}`);
Expand Down
Loading