Title: Support for scientific notation · Issue #146 · python-openapi/openapi-schema-validator · GitHub
Open Graph Title: Support for scientific notation · Issue #146 · python-openapi/openapi-schema-validator
X Title: Support for scientific notation · Issue #146 · python-openapi/openapi-schema-validator
Description: This schema with scientific notation maximum: 1e2 openapi: 3.0.3 info: title: scientific notation description: ... version: 1.0.0 paths: /pet: put: tags: - pet summary: ... description: ... operationId: updatePet requestBody: description...
Open Graph Description: This schema with scientific notation maximum: 1e2 openapi: 3.0.3 info: title: scientific notation description: ... version: 1.0.0 paths: /pet: put: tags: - pet summary: ... description: ... operati...
X Description: This schema with scientific notation maximum: 1e2 openapi: 3.0.3 info: title: scientific notation description: ... version: 1.0.0 paths: /pet: put: tags: - pet summary: ... description: ... operati...
Opengraph URL: https://github.com/python-openapi/openapi-schema-validator/issues/146
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support for scientific notation","articleBody":"This schema with scientific notation `maximum: 1e2`\r\n```\r\nopenapi: 3.0.3\r\ninfo:\r\n title: scientific notation\r\n description: ...\r\n version: 1.0.0\r\npaths:\r\n /pet:\r\n put:\r\n tags:\r\n - pet\r\n summary: ...\r\n description: ...\r\n operationId: updatePet\r\n requestBody:\r\n description: ...\r\n content:\r\n application/json:\r\n schema:\r\n $ref: '#/components/schemas/Pet'\r\n responses:\r\n '200':\r\n description: Successful operation\r\ncomponents:\r\n schemas:\r\n Pet:\r\n type: object\r\n properties:\r\n id:\r\n type: integer\r\n format: int64\r\n maximum: 1e2\r\n example: 10\r\n\r\n```\r\n\r\nresults in this unexpected failure\r\n```\r\n# Validation Error\r\n\r\n{'description': '...', 'content': {'application/json': {'schema': {'type': 'object', 'properties': {'id': {'type': 'integer', 'format': 'int64', 'maximum': '1e2', 'example': 10}}}}}} is not valid under any of the given schemas\r\n\r\nFailed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^\\\\/']['patternProperties']['^(get|put|post|delete|options|head|patch|trace)$']['properties']['requestBody']:\r\n {'oneOf': [{'$ref': '#/definitions/RequestBody'},\r\n {'$ref': '#/definitions/Reference'}]}\r\n\r\nOn instance['paths']['/pet']['put']['requestBody']:\r\n {'content': {'application/json': {'schema': {'properties': {'id': {'example': 10,\r\n 'format': 'int64',\r\n 'maximum': '1e2',\r\n 'type': 'integer'}},\r\n 'type': 'object'}}},\r\n 'description': '...'}\r\n\r\n\r\n# Due to one of those errors\r\n\r\n## {'type': 'object', 'properties': {'id': {'type': 'integer', 'format': 'int64', 'maximum': '1e2', 'example': 10}}} is not valid under any of the given schemas\r\n\r\nFailed validating 'oneOf' in schema[0]['properties']['content']['additionalProperties']['properties']['schema']:\r\n {'oneOf': [{'$ref': '#/definitions/Schema'},\r\n {'$ref': '#/definitions/Reference'}]}\r\n\r\nOn instance['content']['application/json']['schema']:\r\n {'properties': {'id': {'example': 10,\r\n 'format': 'int64',\r\n 'maximum': '1e2',\r\n 'type': 'integer'}},\r\n 'type': 'object'}\r\n\r\n\r\n## '$ref' is a required property\r\n\r\nFailed validating 'required' in schema[1]:\r\n {'patternProperties': {'^\\\\$ref$': {'format': 'uri-reference',\r\n 'type': 'string'}},\r\n 'required': ['$ref'],\r\n 'type': 'object'}\r\n\r\nOn instance:\r\n {'content': {'application/json': {'schema': {'properties': {'id': {'example': 10,\r\n 'format': 'int64',\r\n 'maximum': '1e2',\r\n 'type': 'integer'}},\r\n 'type': 'object'}}},\r\n 'description': '...'}\r\n...\r\n```\r\n\r\nIf I change `maximum: 1e2` to `maximum: 100`, it validates without error.\r\n","author":{"url":"https://github.com/redparham","@type":"Person","name":"redparham"},"datePublished":"2023-11-08T20:28:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/146/openapi-schema-validator/issues/146"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4f409e18-d358-1e0d-3c75-93d9954d192b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C83C:195E14:164BF2:1E896A:6977BD6F |
| html-safe-nonce | 9d306bb967c307ce81cd6b90f304ca2169692b26a57044995a1873d6ec2c33cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODNDOjE5NUUxNDoxNjRCRjI6MUU4OTZBOjY5NzdCRDZGIiwidmlzaXRvcl9pZCI6IjI3MDAyOTEyNjg1OTQ3MjIzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ca9906ec61ada92ce5e79b72615d4926714a345cc932195730d121cceea7b90d |
| hovercard-subject-tag | issue:1988305772 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-openapi/openapi-schema-validator/146/issue_layout |
| twitter:image | https://opengraph.githubassets.com/35033aecd3db9ba86cf9a168dade52677a25b8b831f65cd45a8ddda0c3b83737/python-openapi/openapi-schema-validator/issues/146 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/35033aecd3db9ba86cf9a168dade52677a25b8b831f65cd45a8ddda0c3b83737/python-openapi/openapi-schema-validator/issues/146 |
| og:image:alt | This schema with scientific notation maximum: 1e2 openapi: 3.0.3 info: title: scientific notation description: ... version: 1.0.0 paths: /pet: put: tags: - pet summary: ... description: ... operati... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | redparham |
| hostname | github.com |
| expected-hostname | github.com |
| None | dd7783bd9901db88bac6bc215af7f020bc205a04ebc67e6c7def882ef2859ecd |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openapi/openapi-schema-validator git https://github.com/python-openapi/openapi-schema-validator.git |
| octolytics-dimension-user_id | 126442889 |
| octolytics-dimension-user_login | python-openapi |
| octolytics-dimension-repository_id | 245119225 |
| octolytics-dimension-repository_nwo | python-openapi/openapi-schema-validator |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 245119225 |
| octolytics-dimension-repository_network_root_nwo | python-openapi/openapi-schema-validator |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5d30081a77a5d66860584073cb38fd98fd7f9388 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width