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

Increase number-like data types' precision #36

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

hcsa73
Copy link
Contributor

@hcsa73 hcsa73 commented Oct 20, 2023

To avoid breaking changes in the SDK in changes to precision in the OAS that are allowed (eg, reducing precision in fields only used in responses)

The different number types in OAS are described here. The aim is to have all "type": "number generated as float64 and all "type": "integer" fields generated as int64.

To check that this is working, you can add one of each possible number-like data-type to an OAS structure and generate the SDK:

"number": {
  "type": "number"
},
"float": {
  "type": "number",
  "format": "float"
},
"double": {
  "type": "number",
  "format": "double"
},
"integer": {
  "type": "integer"
},
"int32": {
  "type": "integer",
  "format": "int32"
},
"int64": {
  "type": "integer",
  "format": "int64"
}

@hcsa73 hcsa73 merged commit ed405e7 into main Oct 23, 2023
6 checks passed
@hcsa73 hcsa73 deleted the hs/increase-number-precision branch October 23, 2023 10:20
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

Successfully merging this pull request may close these issues.

2 participants