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

fix(javascript): check that appId, apiKey and region are valid parameters APIC-505 #622

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Jun 2, 2022

🧭 What and Why

🎟 JIRA Ticket: APIC-505

Check the parameters in a basic way, and check that region is within the enum.

🧪 Test

CI

@millotp millotp self-assigned this Jun 2, 2022
@netlify
Copy link

netlify bot commented Jun 2, 2022

Deploy Preview for api-clients-automation canceled.

Name Link
🔨 Latest commit 80f6cab
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/6298d4961305c4000901280a

@millotp millotp requested review from eunjae-lee and damcou June 2, 2022 15:18
@algolia-bot
Copy link
Collaborator

algolia-bot commented Jun 2, 2022

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

Copy link
Contributor

@damcou damcou left a comment

Choose a reason for hiding this comment

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

🚀

@@ -6,7 +6,7 @@ import { create{{capitalizedApiName}} } from '../src/{{apiName}}';
import type { {{capitalizedApiName}} } from '../src/{{apiName}}';

{{#hasRegionalHost}}
import type { Region } from '../src/{{apiName}}';
import { Region, REGIONS } from '../src/{{apiName}}';
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess there's no way to prevent duplication here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we could infer the type here again but as it's already done at the creation there is no point

@millotp millotp merged commit 6e77aa5 into main Jun 3, 2022
@millotp millotp deleted the fix/js-check-region branch June 3, 2022 09:19
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

3 participants