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

SchemaGenerator add Serializer HiddenFields to parameters #4425

Closed
Skorpyon opened this issue Aug 20, 2016 · 3 comments
Closed

SchemaGenerator add Serializer HiddenFields to parameters #4425

Skorpyon opened this issue Aug 20, 2016 · 3 comments
Labels
Milestone

Comments

@Skorpyon
Copy link

Skorpyon commented Aug 20, 2016

When SchemaGenerator return .get_schema() data, HiddenFields included to views parameters:

Serializer

class CommonDriverVehiclePOSTSerializer(serializers.ModelSerializer):
    class Meta:
        model = vehicle_mdl.Vehicle
        exclude = ['deleted', ]
        read_only_fields = ['full_name', 'company']

    driver = serializers.HiddenField(default=CurrentDriverProfileDefault())

Generator response

post: {
    description: "",
    parameters: [
        {type: "string", name: "driver", required: false, description: "", in: "formData"},
    ],
}
@tomchristie tomchristie added this to the 3.4.6 Release milestone Aug 20, 2016
@tomchristie
Copy link
Member

tomchristie commented Aug 20, 2016

Thanks for the report!

@Skorpyon
Copy link
Author

Skorpyon commented Aug 21, 2016

Giant thanks for you. DRF is amazing.
Actually, what you think about channels project? I try implement it in my last project now. Is it good idea to include support of it to DRF? It may be a first in the world REST framework via Websockets.

@tomchristie
Copy link
Member

tomchristie commented Aug 21, 2016

Work on docs and integration for using channels and REST framework together will be coming, yup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants