From 654314cb1b063d638f7164f1ebfe3e3e75905939 Mon Sep 17 00:00:00 2001 From: jo Date: Mon, 27 Jun 2022 17:09:17 +0200 Subject: [PATCH] chore(api): rename country model fields --- api/libretime_api/core/models/country.py | 2 +- api/schema.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/libretime_api/core/models/country.py b/api/libretime_api/core/models/country.py index a6a000176..8e5bdde85 100644 --- a/api/libretime_api/core/models/country.py +++ b/api/libretime_api/core/models/country.py @@ -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: diff --git a/api/schema.yml b/api/schema.yml index b5cc5c1fe..7eb0315dd 100644 --- a/api/schema.yml +++ b/api/schema.yml @@ -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.