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: added logic to handle non alphanumeric characters in smapi swagg… #159

Merged
merged 2 commits into from
May 4, 2020

Conversation

kakhaUrigashvili
Copy link
Contributor

Before slotName was not mapped since in swagger it is intent.name.
Added logic to handle non alphanumeric.

Here is correct output.

ask smapi get-utterance-data -s amzn1.ask.skill.e9ac9d7f-5c4f-4c3b-8e41-1b347f625d95 --intent-name AMAZON.FallbackIntent --debug
Operation: getUtteranceDataV1
Payload:
{
  "skillId": "amzn1.ask.skill.e9ac9d7f-5c4f-4c3b-8e41-1b347f625d95",
  "nextToken": null,
  "maxResults": null,
  "sortDirection": null,
  "sortField": null,
  "stage": null,
  "locale": null,
  "dialogActName": null,
  "intentConfidenceBin": null,
  "intentName": [
    "AMAZON.FallbackIntent"
  ],
  "intentSlotsName": null,
  "interactionType": null,
  "publicationStatus": null,
  "utteranceText": null
}

@kakhaUrigashvili kakhaUrigashvili requested review from Chih-Ying and RonWang and removed request for Chih-Ying May 4, 2020 19:56
@kakhaUrigashvili kakhaUrigashvili marked this pull request as draft May 4, 2020 19:57
if (inputOpts.debug) {
const payload = {};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

improving debug output to show how parameters are mapped to ask-smapi-sdk client

@@ -39,7 +39,7 @@ function kebabCase(str) {
}

function standardize(str) {
return camelCase(str).toLowerCase();
return filterNonAlphanumeric(camelCase(str).toLowerCase());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is basically is the fix.

@kakhaUrigashvili kakhaUrigashvili merged commit 768d56f into develop May 4, 2020
@kakhaUrigashvili kakhaUrigashvili deleted the smapi-dotinname-bug branch May 4, 2020 22:47
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.

2 participants