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

Missing required reponse property of type string format byte #1788

Open
camproto opened this issue Aug 8, 2023 · 2 comments
Open

Missing required reponse property of type string format byte #1788

camproto opened this issue Aug 8, 2023 · 2 comments

Comments

@camproto
Copy link

camproto commented Aug 8, 2023

Describe the issue
Default reponse miss property of type string format byte.

Returned reponse is not valid and consumer crashed.

What you are trying to do
I have a yml with a reponse in which one property is mandatory and of type: string, format: byte.
The request is matched and a response is returned, but this required property is not included, which is clearly seen in the UI and in the log.

MockServer version
mockserver-netty-no-dependencies
5.15.0

To Reproduce
OAS with required property of type: string, format: byte.

In Java main method:
ClientAndServer.startClientAndServer(PORT)
.upsert(
openAPIExpectation("the.yaml"));

Expected behaviour
Return a default byte array (base64 encoded).

I tried example: "VG9sbE5vd0Jld2Vpc21pdHRlbA==", but the property is still not within the response.

MockServer Log
no log error, requests matching expectation and response retured.

@camproto
Copy link
Author

The property will be even not included in reponse, if there is a valid string as example: given in the spec yaml.

@camproto
Copy link
Author

I had to switch because of this flaw to provide a complete response as json file, which is much less convenient - for one byte property. Would be really glad to the cool and short
ClientAndServer.startClientAndServer(port)
.upsert(
openAPIExpectation(...))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant