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

appium config: fix validation for address field #18716

Closed
4 tasks
boneskull opened this issue May 31, 2023 · 0 comments · Fixed by #18824
Closed
4 tasks

appium config: fix validation for address field #18716

boneskull opened this issue May 31, 2023 · 0 comments · Fixed by #18824
Labels
Bug a problem that needs fixing Help Needed contributions wanted! ThirdParty upstream problems

Comments

@boneskull
Copy link
Contributor

See #18690

The address field in the Appium config is a string which can be formatted as a hostname or an ipv6 (per the JSON schema formatting parlance). Unfortunately, there seems to be a bug in json-schema-to-typescript where the ipv6 formatter does not translate correctly to a TS string; instead, it outputs {[key: string]: unknown}.

  1. Report bug to upstream
  2. Fix bug, send PR
  3. Update to new release

alternatively:

  • Implement some sort of workaround for validation; create a new custom formatter in lib/schema/cli-transformers.js and add the appiumCliTransformer prop with the new transformer name to the address object in appium-config-schema.js. It doesn't need to actually transform the value, but it can be used as a validator.

cc @mykola-mokhnach

@boneskull boneskull added Bug a problem that needs fixing ThirdParty upstream problems Help Needed contributions wanted! labels May 31, 2023
@boneskull boneskull changed the title fix validation for address field appium config: fix validation for address field Jun 29, 2023
boneskull added a commit that referenced this issue Jun 29, 2023
This resolves #18716.

For whatever reason, `json-schema-to-typescript` needed `"type": "string"` in there.  See bcherny/json-schema-to-typescript#528 for further discussion
jlipps pushed a commit that referenced this issue Jun 30, 2023
This resolves #18716.

For whatever reason, `json-schema-to-typescript` needed `"type": "string"` in there.  See bcherny/json-schema-to-typescript#528 for further discussion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug a problem that needs fixing Help Needed contributions wanted! ThirdParty upstream problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant