chore(api): rename country model fields

This commit is contained in:
jo 2022-06-27 17:09:17 +02:00 committed by Kyle Robbertze
parent e730959e9f
commit 654314cb1b
2 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@ from django.db import models
class Country(models.Model):
isocode = models.CharField(primary_key=True, max_length=3)
iso_code = models.CharField(primary_key=True, max_length=3, db_column="isocode")
name = models.CharField(max_length=255)
class Meta:

View File

@ -341,12 +341,12 @@ paths:
schema:
$ref: "#/components/schemas/Country"
description: ""
/api/v2/countries/{isocode}/:
/api/v2/countries/{iso_code}/:
get:
operationId: countries_retrieve
parameters:
- in: path
name: isocode
name: iso_code
schema:
type: string
description: A unique value identifying this country.
@ -367,7 +367,7 @@ paths:
operationId: countries_update
parameters:
- in: path
name: isocode
name: iso_code
schema:
type: string
description: A unique value identifying this country.
@ -400,7 +400,7 @@ paths:
operationId: countries_partial_update
parameters:
- in: path
name: isocode
name: iso_code
schema:
type: string
description: A unique value identifying this country.
@ -432,7 +432,7 @@ paths:
operationId: countries_destroy
parameters:
- in: path
name: isocode
name: iso_code
schema:
type: string
description: A unique value identifying this country.