mock-server / mockserver

MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
http://mock-server.com
Apache License 2.0
4.62k stars 1.08k forks source link

Publish Expectations JSON Schema for use in IDEs for Intellisense and Validation #1883

Open dclayton-godaddy opened 5 months ago

dclayton-godaddy commented 5 months ago

Describe the feature request Provide complete expectations JSON schema to be used by IDEs for intellisense and validation.

What you are trying to do We would like to use intellisense and validation in our mock-server expectations in JSON.

The solution you'd like If the schemas provided in this repo were published to https://www.schemastore.org/json/, we can set VS Code to map our json files to the schema and get intellisense and validation.

Describe alternatives you've considered Pointing to the schema files in github directly, however VS Code cannot resolve /definitions/expectation.

Rikuoja commented 2 months ago

Definitely +1 here.

Currently I am trying to figure out, from examples, how exactly to create a slightly more complex expectation JSON. As long as we only have examples, it is very difficult and time-consuming to try to debug your expectations, using time that should be spent testing and debugging the actual code instead.

Only recently realized the expectation JSON file has the same schema as the OpenAPI definition, but couldn't find a way to refer to schemas defined inside the OpenAPI definition.

I am going to have to copy-paste parts of the definition manually to create a valid schema for my VSCode.