Closed GeekBeardLinks closed 8 months ago
Hi @GeekBeardLinks good catch! This is definitely a bug.
If you happen to have the time to send us a PR with tests that fixes this, we'd be grateful :-)
Kotlin is not my thing, but I can try it (I will ask my colleagues for some help). Any clue as to what files I should look at?
@GeekBeardLinks apologies for the radio silence on this issue. The fix should be available in our upcoming release. cc @joelrosario
@GeekBeardLinks The fix is now available as part of release 1.2.15.
Description OpenAPI defines
format: password
as a hint to UI (and probably to Specmatic) to mask the value.When you add
format: password
to an string property to an OpenAPI spec Specmatic expects the property value for an example to be an object instead of a string.If no example is provided then Spectmatic sends an empty object as the property value.
Steps to reproduce Using files:
openapi.yaml
openapi.spec
Run with example:
specmatic test --testBaseURL=https://api.realworld.io/api openapi.spec
Run without example:specmatic test --testBaseURL=https://api.realworld.io/api openapi.yaml
Expected behavior Expect an string value in the passed exampled for the password property. Send an string value for the password property if no example is passed. Ideally mask the password in the output.
Relevant output With example
Without Example
System Information: