You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sysl openapi spec importer behaviour is deterministic function of input
Actual behavior
sysl openapi spec importer behaviour is not deterministic function of input
Your Environment
$ sysl info
Build:
Version : v0.254.0
Git Commit : a5a64cd82c67781f94fe5dd75b846b6446b2783c
Date : 2020-10-25T23:53:41Z
Go Version : go1.14.8 darwin/amd64
OS : darwin/amd64
note: this problem appears present with sysl-go 0.175.0 and sysl-go 0.180.0, which internally use sysl version 0.258.0
The text was updated successfully, but these errors were encountered:
importer code iterates over map items -- the keys are request body media types, the values are schemas for that media type. note the go language reference says "The iteration order over maps is not specified and is not guaranteed to be the same from one iteration to the next." (https://golang.org/ref/spec)
a nameless Param value is created. the param Field is set by fieldForMediaType
the nameless Param is added into the Parameters structure and stored in a map keyed by the name (which appears to be the zero string for all Param values)
Description
sysl-go openapi spec importer behaviour is nondeterministic if input open api spec defines multiple request bodies with differing content-types
Steps to Reproduce
here's a self-contained smoking gun example.
Note: since the behaviour is nondeterministic you may need to run this for 100 or 1000 or 10,000 times on your machine to reproduce
Expected behavior
sysl openapi spec importer behaviour is deterministic function of input
Actual behavior
sysl openapi spec importer behaviour is not deterministic function of input
Your Environment
note: this problem appears present with sysl-go 0.175.0 and sysl-go 0.180.0, which internally use sysl version 0.258.0
The text was updated successfully, but these errors were encountered: