mobile-dev-inc / maestro

Painless Mobile UI Automation
https://maestro.mobile.dev/
Apache License 2.0
5.91k stars 281 forks source link

Create a schema for syntax highlighting of Maestro YAML files in IDEs #467

Open edgarlealbd opened 1 year ago

edgarlealbd commented 1 year ago

As of now, we can't know if Maestro YAML flow files are okay or not via IDE IntelliSense, but only when running maestro test. I propose to create a maestro-schema.json file that provides the IDE with IntelliSense to display errors at coding time.

For example: the following flow wouldn't get flagged by the API as an invalid maestro flow, as foo and xoo are not valid maestro commands:

appId: com.company.app
---
- foo:
    xoo: bar

Here's the URL to a example provided by Codemagic CI to help devs with their codemagic.yaml file: Codemagic schema

Here's an useful article on the matter: How to create your own auto-completion for JSON and YAML files on VS Code with the help of JSON Schema

sregg commented 1 year ago

Here's how it looks otherwise:

image
bartekpacia commented 4 months ago

Thanks for sharing this issue with us! We like it a lot and would be happy to accept a community contribution for this.

For reference, please also see issues #932 and #1784. There's a lot of info in there that will be useful to the person implementing this.