openapi: 3.2.0 info: title: Tandoor Search Preference API version: 0.0.0 (2.6.13) x-logo: url: /static/assets/brand_logo.svg backgroundColor: '#FFFFFF' altText: Tandoor logo href: / description: Tandoor API Docs tags: - name: Search Preference paths: /api/search-preference/: get: operationId: apiSearchPreferenceList description: logs request counts to redis cache total/per user/ tags: - Search Preference security: - ApiKeyAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/SearchPreference' description: '' summary: Api search preference list x-summary-source: derived /api/search-preference/{user}/: get: operationId: apiSearchPreferenceRetrieve description: logs request counts to redis cache total/per user/ parameters: - in: path name: user schema: type: integer description: A unique value identifying this search preference. required: true tags: - Search Preference security: - ApiKeyAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/SearchPreference' description: '' summary: Api search preference retrieve x-summary-source: derived patch: operationId: apiSearchPreferencePartialUpdate description: logs request counts to redis cache total/per user/ parameters: - in: path name: user schema: type: integer description: A unique value identifying this search preference. required: true tags: - Search Preference requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedSearchPreference' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedSearchPreference' multipart/form-data: schema: $ref: '#/components/schemas/PatchedSearchPreference' security: - ApiKeyAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/SearchPreference' description: '' summary: Api search preference partial update x-summary-source: derived components: schemas: SearchPreference: type: object description: Adds nested create feature properties: user: allOf: - $ref: '#/components/schemas/User' readOnly: true search: $ref: '#/components/schemas/SearchEnum' lookup: type: boolean unaccent: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' icontains: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' istartswith: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' trigram: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' fulltext: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' trigram_threshold: type: number format: double exclusiveMinimum: -10 exclusiveMaximum: 10 required: - user SearchFields: type: object description: "Moves `UniqueValidator`'s from the validation stage to the save stage.\nIt solves the problem with nested validation for unique fields on update.\n\nIf you want more details, you can read related issues and articles:\nhttps://github.com/beda-software/drf-writable-nested/issues/1\nhttp://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers\n\nExample of usage:\n```\n class Child(models.Model):\n field = models.CharField(unique=True)\n\n\nclass Parent(models.Model):\n child = models.ForeignKey('Child')\n\n\nclass ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):\n class Meta:\n model = Child\n\n\nclass ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):\n child = ChildSerializer()\n\n class Meta:\n model = Parent\n```\n\nNote: `UniqueFieldsMixin` must be applied only on the serializer\nwhich has unique fields.\n\nNote: When you are using both mixins\n(`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)\nyou should put `UniqueFieldsMixin` ahead." properties: id: type: integer readOnly: false name: type: - string - 'null' field: type: - string - 'null' required: [] SearchEnum: enum: - plain - phrase - websearch - raw type: string description: '* `plain` - Simple * `phrase` - Phrase * `websearch` - Web * `raw` - Raw' PatchedSearchPreference: type: object description: Adds nested create feature properties: user: allOf: - $ref: '#/components/schemas/User' readOnly: true search: $ref: '#/components/schemas/SearchEnum' lookup: type: boolean unaccent: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' icontains: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' istartswith: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' trigram: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' fulltext: type: - array - 'null' items: $ref: '#/components/schemas/SearchFields' trigram_threshold: type: number format: double exclusiveMinimum: -10 exclusiveMaximum: 10 User: type: object description: Adds nested create feature properties: id: type: integer readOnly: false username: type: string readOnly: true description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. first_name: type: string maxLength: 150 last_name: type: string maxLength: 150 display_name: type: string readOnly: true is_staff: type: boolean readOnly: true title: Staff status description: Designates whether the user can log into this admin site. is_superuser: type: boolean readOnly: true title: Superuser status description: Designates that this user has all permissions without explicitly assigning them. is_active: type: boolean readOnly: true title: Active description: Designates whether this user should be treated as active. Unselect this instead of deleting accounts. required: - display_name - is_active - is_staff - is_superuser - username securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization