Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

inflector configuration #136

Closed
Closed
@jklapuch

Description

@jklapuch

Hi,
I found a problem with configuration,

JSON_API_FORMAT_KEYS = 'underscore'

has no effect:

{
"data": {
    "type": "List",
    "id": "fb2c1e3c-0255-4c4c-82c5-2eb3e3e62529",
    "attributes": {
        "title": "super seznam"
    },
    "relationships": {
        "owner": {
            "data": {
                "type": "User",
                "id": "de394d10-c664-4fbe-9668-0df803e2cfa1"
            }
        },
        "category": {
            "data": {
                "type": "ListCategory",
                "id": "1"
            }
        }
    },
    "links": {
        "self": "http://127.0.0.1:8000/api/lists/fb2c1e3c-0255-4c4c-82c5-2eb3e3e62529/"
    }
}
}

JSON_API_FORMAT_RELATION_KEYS = 'underscore'

affects all "type" names:

{
"data": {
    "type": "list",
    "id": "fb2c1e3c-0255-4c4c-82c5-2eb3e3e62529",
    "attributes": {
        "title": "super seznam"
    },
    "relationships": {
        "owner": {
            "data": {
                "type": "user",
                "id": "de394d10-c664-4fbe-9668-0df803e2cfa1"
            }
        },
        "category": {
            "data": {
                "type": "list_category",
                "id": "1"
            }
        }
    },
    "links": {
        "self": "http://127.0.0.1:8000/api/lists/fb2c1e3c-0255-4c4c-82c5-2eb3e3e62529/"
    }
}
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions