Cannot passing json string ttext with space
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start by reproducing the az apic api create command in PowerShell with --custom-properties, comparing SampleWork with Sample Work. Trace the argument parsing for this option; done means JSON string values containing spaces are accepted without the shorthand syntax error.
Written by the indexing model from the issue text.
Description
Description
I am trying to register an api with --custom-properties. It works fine until I add space in json string for .--custom-properties.
Reproduction steps
Steps to reproduce the behavior:
using Powershell the below command is wont work if there is space between Sample Work. It works if the space is removed:
az apic api create --resource-group "rg-azintegration" --service-name "my-int-apic-npe"
--api-id "newrestproductsystemwithallmetadata2" --title "2 My rest product system all metadata"
--type "rest" --description "My product rest api metadata"
--summary "short product api summary metadata" `
--custom-properties '{"TargetSystem":Sun,"Authentication":["SAML"],"IntergationId":"OnlyString1234","Entity":"Sample work"}'
However, if a set the Entity in --custom-properties to "Sample Work", adding space between Sample and Work it fails with the below error.
az : ERROR: Failed to parse '--custom-properties' argument: Shorthand Syntax Error: Please wrap whitespace
character in single quotes:
At line:4 char:1
- az apic api create --resource-group "rt-syd-npe-arg-icc-devtest-azint ...
-
+ CategoryInfo : NotSpecified: (ERROR: Failed t... single quotes::String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError {TargetSystem:Sun,Authentication:[SAML],IntergationId:OnlyString1234,Entity:Sample
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
If I remove the space between the string SampleWork it works fine.
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
- Dominant language
- PowerShell
- Stars
- 45
- Forks
- 21
- Avg merge
- 21m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/api-center
-
Feature request Untriaged
Difficulty 5/5 Over a week Newbie friendliness 48/100
Azure/api-center#93 · 1 comment ·
-
Bug Untriaged
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Azure/api-center#92 · 1 reaction ·
-
Bug Untriaged
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Azure/api-center#91 · 1 comment ·
-
Feature request Untriaged
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Azure/api-center#90 · 1 comment · 1 reaction ·
-
Bug
Difficulty 3/5 1-2 days Newbie friendliness 65/100
Azure/api-center#89 · 1 comment · 1 reaction ·
All issues in Azure/api-center
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
from:qa priority:P2 reliability tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spec-kitty/spec-kitty#4874 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
automation code-quality cookie deep-report documentation improvement quick-win task-mining
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100