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

Bug in Model (Definition) Description with newline characters #3078

Closed
1Map opened this issue May 15, 2017 · 2 comments · Fixed by #3353
Closed

Bug in Model (Definition) Description with newline characters #3078

1Map opened this issue May 15, 2017 · 2 comments · Fixed by #3353

Comments

@1Map
Copy link

1Map commented May 15, 2017

I have the following (example from my json definitions) - Please note very long description with newline characters:

        "Polygon": {
            "type": "object",
            "description": "GeoJSon Polygon geometry.\nExample:\n{\n    \"type\": \"Polygon\",\n    \"coordinates\": [\n        [\n            [\n                19.01064708,\n                -33.65407188\n            ],\n            [\n              19.01067012,\n              -33.65400312\n            ],\n            [\n              19.01083032,\n              -33.65394183\n            ],\n            [\n              19.01098944,\n              -33.65414082\n            ],\n            [\n              19.01106252,\n              -33.65423181\n            ],\n            [\n              19.01085048,\n              -33.65432082\n            ],\n            [\n              19.0107036,\n              -33.65414091\n            ],\n            [\n              19.01064708,\n              -33.65407188\n            ]\n        ]\n    ]\n}",
            "properties": {
                "type": {
                    "type": "string",
                    "enum": [
                        "Polygon"
                    ],
                    "description": "the geometry type - Polygon"
                },
                "coordinates": {
                    "type": "array",
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/definitions/Point2D"
                        }
                    }
                }
            }
        },

Currently the newline character is ignored in the json description and renders as follow:

image

By giving the td (where the description lies) a style of:
white-space: pre;

it renders correctly:

image

@shockey
Copy link
Contributor

shockey commented May 15, 2017

cc @bodnia

@bodnia bodnia self-assigned this May 15, 2017
@1Map
Copy link
Author

1Map commented May 15, 2017

I cannot find a way to override the style for the "description" part. If there was a way, then I can add the white-space: pre; myself to override it and also change the ugly font-family to "Roboto" and a pixel smaller which shows very nicely, but I cannot seem to change the style as the description part has no definitive class name. It is very difficult to change the style on some elements on the UI.

@owenconti owenconti self-assigned this Jul 8, 2017
shockey added a commit that referenced this issue Jul 15, 2017
@lock lock bot unassigned owenconti and bodnia Jul 3, 2019
@lock lock bot locked and limited conversation to collaborators Jul 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants