<commit_before>from .models import Errata, ExternalDocumentation

from rest_framework import serializers

class ExternalDocumentationSerializer(serializers.ModelSerializer):
    class Meta:
        model = ExternalDocumentation
        fields = ('file', )


class ErrataSerializer(serializers.ModelSerializer):
    #external_documentation = ExternalDocumentationSerializer(many=True)
    # Read-only fields
    resolution_date = serializers.DateField(read_only=True)

    class Meta:
        model = Errata
        fields = ('id',
                  'created',
                  'modified',
                  'book',
                  'status',
                  'resolution',
                  'archived',
                  'location',
                  'detail',
                  'short_detail',
                  'resolution_date',
                  'error_type',
                  'resource',
                  'submitted_by',
                  'submitter_email_address',)<commit_msg>add resource and error_type other fields to api<commit_after>from .models import Errata, ExternalDocumentation

from rest_framework import serializers

class ExternalDocumentationSerializer(serializers.ModelSerializer):
    class Meta:
        model = ExternalDocumentation
        fields = ('file', )


class ErrataSerializer(serializers.ModelSerializer):
    #external_documentation = ExternalDocumentationSerializer(many=True)
    # Read-only fields
    resolution_date = serializers.DateField(read_only=True)

    class Meta:
        model = Errata
        fields = ('id',
                  'created',
                  'modified',
                  'book',
                  'status',
                  'resolution',
                  'archived',
                  'location',
                  'detail',
                  'short_detail',
                  'resolution_date',
                  'error_type',
                  'error_type_other',
                  'resource',
                  'resource_other',
                  'submitted_by',
                  'submitter_email_address',)
{'fraction_non_alphanumeric': 0.08253358925143954, 'fraction_numerical': 0.0, 'mean_word_length': 1.679948586118252, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5409362', 'n_tokens_mistral': 512, 'n_tokens_neox': 470, 'n_words': 98}