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

Improve the readability of the web API Help Page at Web/Services/ #369

Merged

Conversation

JohnVillalovos
Copy link
Contributor

Main thing these patches do is to pretty-print the JSON on the help page so that it is easier to read.

Previously most of the API Help page (Web/Services/) was on a single
line, when viewed using view-source in the browser. Add line-feeds so
that it is easier to read when using view-source.
Pretty-print the JSON when displaying it on the API Help Page
(Web/Services/)

For example this is how a portion of the CreateCustomAttribute
endpoint docs look. Previously the JSON was all on one line, which
made it difficult to read.

Response

{
    "links": [
        {
            "href": "http:\/\/url\/to\/attribute",
            "title": "get_custom_attribute"
        },
        {
            "href": "http:\/\/url\/to\/update\/attribute",
            "title": "update_custom_attribute"
        }
    ],
    "message": null,
    "attributeId": 1
}

Request

{
    "label": "attribute name",
    "type": 1,
    "categoryId": 1,
    "regex": "validation regex",
    "required": true,
    "possibleValues": [
        "possible",
        "values",
        "only valid for select list"
    ],
    "sortOrder": 100,
    "appliesToIds": [
        10
    ],
    "adminOnly": true,
    "isPrivate": true,
    "secondaryCategoryId": 1,
    "secondaryEntityIds": [
        1,
        2
    ]
}
@effgarces effgarces merged commit aee5e1e into LibreBooking:develop Jun 14, 2024
1 check passed
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