Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Nov 20, 2024
1 parent d74c8e9 commit 821604b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
4 changes: 2 additions & 2 deletions api/specs/web-server/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from common_library.pydantic_fields_extension import get_type
from fastapi import FastAPI, Query
from models_library.basic_types import LogLevel
from pydantic import BaseModel, ConfigDict, Field, create_model
from pydantic import BaseModel, ConfigDict, Field, Json, create_model
from pydantic.fields import FieldInfo
from servicelib.fastapi.openapi import override_fastapi_openapi_method

Expand Down Expand Up @@ -77,7 +77,7 @@ def as_query(model_class: type[BaseModel]) -> type[BaseModel]:
"json_schema_extra": field_info.json_schema_extra or {},
}

json_field_type = str
json_field_type = Json
# _create_json_type(
# description=query_kwargs["description"],
# example=query_kwargs.get("json_schema_extra", {}).get("example_json"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2625,13 +2625,17 @@ paths:
schema:
anyOf:
- type: string
contentMediaType: application/json
contentSchema: {}
- type: 'null'
title: Filters
- name: order_by
in: query
required: false
schema:
type: string
contentMediaType: application/json
contentSchema: {}
default: '{"field":"modified","direction":"desc"}'
title: Order By
- name: limit
Expand Down Expand Up @@ -2688,13 +2692,17 @@ paths:
schema:
anyOf:
- type: string
contentMediaType: application/json
contentSchema: {}
- type: 'null'
title: Filters
- name: order_by
in: query
required: false
schema:
type: string
contentMediaType: application/json
contentSchema: {}
default: '{"field":"modified","direction":"desc"}'
title: Order By
- name: limit
Expand Down Expand Up @@ -3234,13 +3242,17 @@ paths:
schema:
anyOf:
- type: string
contentMediaType: application/json
contentSchema: {}
- type: 'null'
title: Filters
- name: order_by
in: query
required: false
schema:
type: string
contentMediaType: application/json
contentSchema: {}
default: '{"field":"last_change_date","direction":"desc"}'
title: Order By
- name: limit
Expand Down Expand Up @@ -3376,6 +3388,8 @@ paths:
required: false
schema:
type: string
contentMediaType: application/json
contentSchema: {}
default: '{"field":"last_change_date","direction":"desc"}'
title: Order By
- name: limit
Expand Down Expand Up @@ -4382,7 +4396,7 @@ paths:
'403':
description: ProjectInvalidRightsError
'404':
description: UserDefaultWalletNotFoundError, ProjectNotFoundError
description: ProjectNotFoundError, UserDefaultWalletNotFoundError
'409':
description: ProjectTooManyProjectOpenedError
'422':
Expand Down Expand Up @@ -4605,6 +4619,8 @@ paths:
required: false
schema:
type: string
contentMediaType: application/json
contentSchema: {}
default: '{"field":"started_at","direction":"desc"}'
title: Order By
- name: wallet_id
Expand All @@ -4624,8 +4640,7 @@ paths:
anyOf:
- type: string
contentMediaType: application/json
contentSchema:
type: string
contentSchema: {}
- type: 'null'
title: Filters
- name: limit
Expand Down Expand Up @@ -4709,6 +4724,8 @@ paths:
required: false
schema:
type: string
contentMediaType: application/json
contentSchema: {}
default: '{"field":"started_at","direction":"desc"}'
title: Order By
- name: wallet_id
Expand All @@ -4728,8 +4745,7 @@ paths:
anyOf:
- type: string
contentMediaType: application/json
contentSchema:
type: string
contentSchema: {}
- type: 'null'
title: Filters
responses:
Expand Down

0 comments on commit 821604b

Please sign in to comment.