Comments (5)
Hi,
I am a little confused, when you drop fields from the example, where are you expecting it to fail? Examples are only used to render a response in mock mode, it's not used in any other way for validation, the schema is still what is used to validate requests and responses.
I need a little more information as to how you're using the tool (it's quite flexible and folks use it in lots of different ways)
from wiretap.
yeah, so i'm trying to use as part of a local developer flow. The flow i'm thinking of is the following:
- Dev A writes a new API endpoint spec and adds some examples. How can he validate that the examples follow the spec?
- Assume that Dev A makes a mistake and doesn't check his examples correctly, how can Dev B use wiretap as a mock server to test the API if the specs are not validated it?
from wiretap.
- Dev A writes a new API endpoint spec and adds some examples. How can he validate that the examples follow the spec?
I see, so this part of the puzzle is handled by another tool that does OpenAPI spec analysis. It's called vacuum and read more about it at https://quobix.com/vacuum
If you're feeling brave you can use our newest (early alpha) tool called the OpenAPI doctor, that will combine wiretap and vacuum into a suite (eventually) https://doctor.pb33f.io
I don't plan on building this functionality into wiretap, because the doctor will provide both wiretap capability and OpenAPI analysis and change detection.
from wiretap.
ahh i understand, but do you think there's some difference in behaviour when you do a get request that returns an example, even though it's invalid. And when you do something like a post request that you can see a violation on the UI
from wiretap.
ahh i understand, but do you think there's some difference in behaviour when you do a get request that returns an example, even though it's invalid. And when you do something like a post request that you can see a violation on the UI
I am struggling to understand what you mean, would you be able to explain it a little differently to me? I apologize, I work across multiple OpenAPI projects and my brain sees OpenAPI like a compiler does, I struggle a little sometimes with concepts like this.
from wiretap.
Related Issues (20)
- Requests checking request method type of previous request HOT 2
- Proxying different urls HOT 3
- wiretap service crashes when trying to send response HOT 5
- Panic encountered during jsonschema validation HOT 7
- Mock response didn't return the expected example data HOT 3
- Rewriting paths leads to: unsupported protocol scheme \"\"" HOT 6
- Install not working using a Windows environment HOT 2
- wiretap fails to authenticate a operation that uses the same route but unique via a fragment HOT 4
- feature request: allow configuring returned status code via header or similar HOT 1
- Expected example data not returned HOT 1
- unexpected validate error when dealing with exploded query params
- panic in libopenapi when encountering json encoded path parameter HOT 1
- handle schemas with different format types when mocking/returning responses HOT 1
- feature request: support speakeasy example expansion directive
- feature request: validate request based on examples HOT 2
- request unexpectedly fails validation HOT 1
- Wiretap shows violations when response object has string as null when the open API specifies nullable: true HOT 5
- Monitor OpenAPI preview does not toggle when navigating from Violations HOT 1
- Monitor Request Body not cleared when switching to request which does not have Body HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiretap.