forked from go-swagger/go-swagger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make format resolving strictly to require a valid pair of type and fo…
…rmat. The before implementation checks format only but it causes wrong type decisions. e.g. {"type": "string", "format": "uint64"} had been converted to uint64. This behaivior is correct in case of "type" is "integer" or "number", but the "string" case is not. This commit changes this decision algorithm. "format" is not treated as same of "type" anymore. "format" must be available when it is specified with the valid (matched) "type". If not, the "format" will be ignored and it just decides the type of Go code by using "type" value. Signed-off-by: Kousuke Ebihara <[email protected]>
- Loading branch information
Showing
3 changed files
with
120 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters