working search with flat endpoint

This commit is contained in:
vabene1111
2024-02-29 20:08:37 +01:00
parent e47bdd043e
commit 1cac34d2a0
143 changed files with 18623 additions and 9992 deletions

View File

@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* Django Recipes
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,15 +13,49 @@
*/
import { exists, mapValues } from '../runtime';
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataUnitVersionFromJSON,
OpenDataUnitVersionFromJSONTyped,
OpenDataUnitVersionToJSON,
} from './OpenDataUnitVersion';
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
} from './OpenDataVersion';
/**
* Moves `UniqueValidator`'s from the validation stage to the save stage.
* It solves the problem with nested validation for unique fields on update.
*
* If you want more details, you can read related issues and articles:
* https://github.com/beda-software/drf-writable-nested/issues/1
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
*
* Example of usage:
* ```
* class Child(models.Model):
* field = models.CharField(unique=True)
*
*
* class Parent(models.Model):
* child = models.ForeignKey('Child')
*
*
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
* class Meta:
* model = Child
*
*
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
* child = ChildSerializer()
*
* class Meta:
* model = Parent
* ```
*
* Note: `UniqueFieldsMixin` must be applied only on the serializer
* which has unique fields.
*
* Note: When you are using both mixins
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
* you should put `UniqueFieldsMixin` ahead.
* @export
* @interface OpenDataCategory
*/
@@ -31,13 +65,13 @@ export interface OpenDataCategory {
* @type {number}
* @memberof OpenDataCategory
*/
readonly id?: number;
readonly id: number;
/**
*
* @type {OpenDataUnitVersion}
* @type {OpenDataVersion}
* @memberof OpenDataCategory
*/
version: OpenDataUnitVersion;
version: OpenDataVersion;
/**
*
* @type {string}
@@ -67,7 +101,7 @@ export interface OpenDataCategory {
* @type {string}
* @memberof OpenDataCategory
*/
readonly createdBy?: string;
readonly createdBy: string;
}
/**
@@ -75,9 +109,11 @@ export interface OpenDataCategory {
*/
export function instanceOfOpenDataCategory(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "version" in value;
isInstance = isInstance && "slug" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "createdBy" in value;
return isInstance;
}
@@ -92,13 +128,13 @@ export function OpenDataCategoryFromJSONTyped(json: any, ignoreDiscriminator: bo
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'version': OpenDataUnitVersionFromJSON(json['version']),
'id': json['id'],
'version': OpenDataVersionFromJSON(json['version']),
'slug': json['slug'],
'name': json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'comment': !exists(json, 'comment') ? undefined : json['comment'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdBy': json['created_by'],
};
}
@@ -111,7 +147,7 @@ export function OpenDataCategoryToJSON(value?: OpenDataCategory | null): any {
}
return {
'version': OpenDataUnitVersionToJSON(value.version),
'version': OpenDataVersionToJSON(value.version),
'slug': value.slug,
'name': value.name,
'description': value.description,