def register(self, model: 'data.Model'):

    def create_defs(collection, attr_name: Literal[('payloads', 'responses')]):
        defs = self._extract_defs(model, type(model), attr_name, model.__blnt__.merge_defs)
        for (model_key, payload) in defs.items():
            definition = mapping.Definition(model.__blnt__.name, model_key)
            for field in payload:
                definition.fields.append(field)
            if (definition.model_name not in collection):
                collection[definition.model_name] = {}
            collection[definition.model_name][definition.model_key] = definition
    create_defs(self._payloads, 'payloads')
    create_defs(self._responses, 'responses')
def register(self, model: 'data.Model'):

    def create_defs(collection, attr_name: Literal[('payloads', 'responses')]):
        defs = self._extract_defs(model, type(model), attr_name, model.__blnt__.merge_defs)
        for (model_key, payload) in defs.items():
            definition = mapping.Definition(model.__blnt__.name, model_key)
            for field in payload:
                definition.fields.append(field)
            if (definition.model_name not in collection):
                collection[definition.model_name] = {}
            collection[definition.model_name][definition.model_key] = definition
    create_defs(self._payloads, 'payloads')
    create_defs(self._responses, 'responses')