So I had this wsdl type
<xsd:element name="studentMarks" minOccurs="0"
maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="10" />
<xsd:fractionDigits value="5" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
I want to convert this to an OpenAPI field with type: number
.
This is what I have come up with, which is wrong.
I know that I can use string type to do this. But is there a way to do this with type number?
"studentMarks": {
"type": "number",
"format": "double",
"multipleOf": 1e-5
},
So I had this wsdl type
<xsd:element name="studentMarks" minOccurs="0"
maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="10" />
<xsd:fractionDigits value="5" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
I want to convert this to an OpenAPI field with type: number
.
This is what I have come up with, which is wrong.
I know that I can use string type to do this. But is there a way to do this with type number?
"studentMarks": {
"type": "number",
"format": "double",
"multipleOf": 1e-5
},
Share
Improve this question
edited Mar 25 at 14:15
Jeremy Fiel
3,3652 gold badges12 silver badges26 bronze badges
asked Mar 25 at 12:41
noddermonnoddermon
111 bronze badge
1 Answer
Reset to default 0You can set the multipleOf to 0.00001
and the exclusiveMaximum value to 1000000000
{
"studentMarks": {
"type": "number",
"multipleOf": 0.00001,
"exclusiveMaximum": 1000000000
}