pki.serializer.truststore ========================= .. py:module:: pki.serializer.truststore .. autoapi-nested-parse:: Serializers for Truststore-related API endpoints. Defines classes that handle validation and transformation of Truststore model instances to and from JSON. Module Contents --------------- .. py:class:: TruststoreSerializer(instance=None, data=empty, **kwargs) Bases: :py:obj:`rest_framework.serializers.ModelSerializer`\ [\ :py:obj:`pki.models.truststore.TruststoreModel`\ ] Serializer for Certificate instances. Handles conversion between Certificate model objects and JSON representations. .. py:attribute:: unique_name .. py:attribute:: intended_usage .. py:attribute:: trust_store_file .. py:class:: Meta Metadata for TruststoreSerializer, defining model and serialized fields. .. py:attribute:: model .. py:attribute:: fields :type: ClassVar[list[str]] :value: ['id', 'unique_name', 'intended_usage', 'created_at', 'trust_store_file'] .. py:attribute:: read_only_fields :type: ClassVar[list[str]] :value: ['id'] .. py:method:: validate_trust_store_file(file) Validate uploaded truststore file.