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

Type bug of fields in PointCloud.json #42

Closed
AndyYangjd opened this issue Jun 27, 2022 · 1 comment
Closed

Type bug of fields in PointCloud.json #42

AndyYangjd opened this issue Jun 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@AndyYangjd
Copy link

There is a missing type description in "Type" of fields in PointCloud.json.
The related information is descripted below:

Original code:

"type": {
            "title": "NumericType: Numeric type",
            "description": "Type of data in the field. Integers are stored using little-endian byte order.",
            "oneOf": [
              {
                "title": "UNKNOWN",
                "const": 0
              },
              {
                "title": "UINT8",
                "const": 1
              },
              {
                "title": "INT8",
                "const": 2
              },
              {
                "title": "UINT16",
                "const": 3
              },
              {
                "title": "INT16",
                "const": 4
              },
              {
                "title": "UINT32",
                "const": 5
              },
              {
                "title": "INT32",
                "const": 6
              },
              {
                "title": "FLOAT32",
                "const": 7
              },
              {
                "title": "FLOAT64",
                "const": 8
              }
            ]
         }

Corrected code:

"type": {
                            "oneOf": [
                                {
                                    "title": "UNKNOWN",
                                    "type": "integer",
                                    "const": 0
                                },
                                {
                                    "title": "UINT8",
                                    "type": "integer",
                                    "const": 1
                                },
                                {
                                    "title": "INT8",
                                    "type": "integer",
                                    "const": 2
                                },
                                {
                                    "title": "UINT16",
                                    "type": "integer",
                                    "const": 3
                                },
                                {
                                    "title": "INT16",
                                    "type": "integer",
                                    "const": 4
                                },
                                {
                                    "title": "UINT32",
                                    "type": "integer",
                                    "const": 5
                                },
                                {
                                    "title": "INT32",
                                    "type": "integer",
                                    "const": 6
                                },
                                {
                                    "title": "FLOAT32",
                                    "type": "integer",
                                    "const": 7
                                },
                                {
                                    "title": "FLOAT64",
                                    "type": "integer",
                                    "const": 8
                                }
                            ]
                        }
@AndyYangjd AndyYangjd added the bug Something isn't working label Jun 27, 2022
@jtbandes
Copy link
Member

I don't think this change to add type is necessary. This title/const pattern for enums was recommended in json-schema-org/json-schema-spec#57. Additional type information is not necessary because the const contains the exact value already. Did this cause some problem for you in practice?

@jtbandes jtbandes closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants