working search with flat endpoint

This commit is contained in:
vabene1111
2024-02-29 20:08:37 +01:00
committed by smilerz
parent 4a8ad3db1e
commit 17f875863c
143 changed files with 18624 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).
@@ -14,7 +14,41 @@
import { exists, mapValues } from '../runtime';
/**
* 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 Keyword
*/
@@ -24,7 +58,7 @@ export interface Keyword {
* @type {number}
* @memberof Keyword
*/
readonly id?: number;
readonly id: number;
/**
*
* @type {string}
@@ -36,7 +70,7 @@ export interface Keyword {
* @type {string}
* @memberof Keyword
*/
readonly label?: string;
readonly label: string;
/**
*
* @type {string}
@@ -48,31 +82,31 @@ export interface Keyword {
* @type {string}
* @memberof Keyword
*/
readonly parent?: string;
readonly parent: string;
/**
*
* @type {number}
* @memberof Keyword
*/
readonly numchild?: number;
readonly numchild: number;
/**
*
* @type {Date}
* @memberof Keyword
*/
readonly createdAt?: Date;
readonly createdAt: Date;
/**
*
* @type {Date}
* @memberof Keyword
*/
readonly updatedAt?: Date;
readonly updatedAt: Date;
/**
*
* @type {string}
* @memberof Keyword
*/
readonly fullName?: string;
readonly fullName: string;
}
/**
@@ -80,7 +114,14 @@ export interface Keyword {
*/
export function instanceOfKeyword(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "label" in value;
isInstance = isInstance && "parent" in value;
isInstance = isInstance && "numchild" in value;
isInstance = isInstance && "createdAt" in value;
isInstance = isInstance && "updatedAt" in value;
isInstance = isInstance && "fullName" in value;
return isInstance;
}
@@ -95,15 +136,15 @@ export function KeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): K
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'id': json['id'],
'name': json['name'],
'label': !exists(json, 'label') ? undefined : json['label'],
'label': json['label'],
'description': !exists(json, 'description') ? undefined : json['description'],
'parent': !exists(json, 'parent') ? undefined : json['parent'],
'numchild': !exists(json, 'numchild') ? undefined : json['numchild'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
'fullName': !exists(json, 'full_name') ? undefined : json['full_name'],
'parent': json['parent'],
'numchild': json['numchild'],
'createdAt': (new Date(json['created_at'])),
'updatedAt': (new Date(json['updated_at'])),
'fullName': json['full_name'],
};
}