Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tfranzel/drf-spectacular
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 96a0a14a443bf931d388c675212f6ad91f790389
Choose a base ref
..
head repository: tfranzel/drf-spectacular
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3911c5534fab4bedf9e9ffc267dff21b5f58ac51
Choose a head ref
Showing with 0 additions and 2 deletions.
  1. +0 −2 drf_spectacular/openapi.py
2 changes: 0 additions & 2 deletions drf_spectacular/openapi.py
Original file line number Diff line number Diff line change
@@ -519,12 +519,10 @@ def _resolve_path_parameters(self, variables):
model_field_name = variable
model_field = follow_model_field_lookup(model, model_field_name)
schema = self._map_model_field(model_field, direction=None)

if 'type' in schema and schema['type'] == OpenApiTypes.STR:
regex_resolved_parameter = resolve_regex_path_parameter(self.path_regex, variable)
if regex_resolved_parameter:
schema = regex_resolved_parameter['schema']

if 'description' not in schema and model_field.primary_key:
description = get_pk_description(model, model_field)
except django_exceptions.FieldError: