Skip to content

Commit 5ffa7ce

Browse files
authored
Fix/openapi generator source enum (#7)
* dev/openapi.yaml: Source returned back to Enum type * updated generated files
1 parent 30f4024 commit 5ffa7ce

23 files changed

+56
-56
lines changed

resources/dev-openai/.well-known/openapi.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ components:
6565
type: object
6666
properties:
6767
source:
68-
type: string
69-
# $ref: "#/components/schemas/Source"
68+
# type: string
69+
$ref: "#/components/schemas/Source"
7070
source_id:
7171
title: Source Id
7272
type: string
@@ -114,8 +114,8 @@ components:
114114
title: Document Id
115115
type: string
116116
source:
117-
type: string
118-
# $ref: "#/components/schemas/Source"
117+
# type: string
118+
$ref: "#/components/schemas/Source"
119119
source_id:
120120
title: Source Id
121121
type: string
@@ -260,8 +260,8 @@ components:
260260
type: object
261261
properties:
262262
source:
263-
type: string
264-
# $ref: "#/components/schemas/Source"
263+
# type: string
264+
$ref: "#/components/schemas/Source"
265265
source_id:
266266
type: string
267267
url:

src/datastore/factory.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ global DATASTORE_MODULE = let
2323
end
2424
using Pkg
2525
function get_datastore()::Union{AbstractStorage,Nothing}
26+
@info string("Requested datastore: ", datastore_env())
2627
isnothing(DATASTORE_MODULE) && error("DATASTORE environment variable must be non empty and valid")
2728

2829
DATASTORE_MODULE.create_storage()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.6.0
1+
7.0.0-SNAPSHOT

src/generated/docs/DocumentChunkMetadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**source** | **String** | | [optional] [default to nothing]
7+
**source** | [***Source**](Source.md) | | [optional] [default to nothing]
88
**source_id** | **String** | | [optional] [default to nothing]
99
**url** | **String** | | [optional] [default to nothing]
1010
**created_at** | **String** | | [optional] [default to nothing]

src/generated/docs/DocumentMetadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**source** | **String** | | [optional] [default to nothing]
7+
**source** | [***Source**](Source.md) | | [optional] [default to nothing]
88
**source_id** | **String** | | [optional] [default to nothing]
99
**url** | **String** | | [optional] [default to nothing]
1010
**created_at** | **String** | | [optional] [default to nothing]

src/generated/docs/DocumentMetadataFilter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**document_id** | **String** | | [optional] [default to nothing]
8-
**source** | **String** | | [optional] [default to nothing]
8+
**source** | [***Source**](Source.md) | | [optional] [default to nothing]
99
**source_id** | **String** | | [optional] [default to nothing]
1010
**author** | **String** | | [optional] [default to nothing]
1111
**start_date** | **String** | | [optional] [default to nothing]

src/generated/src/models/model_Document.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Do not modify this file directly. Modify the OpenAPI specification instead.
33

44

5-
@doc raw"""
5+
@doc raw"""Document
6+
67
Document(;
78
id=nothing,
89
text=nothing,

src/generated/src/models/model_DocumentChunk.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Do not modify this file directly. Modify the OpenAPI specification instead.
33

44

5-
@doc raw"""
5+
@doc raw"""DocumentChunk
6+
67
DocumentChunk(;
78
id=nothing,
89
text=nothing,

src/generated/src/models/model_DocumentChunkMetadata.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Do not modify this file directly. Modify the OpenAPI specification instead.
33

44

5-
@doc raw"""
5+
@doc raw"""DocumentChunkMetadata
6+
67
DocumentChunkMetadata(;
78
source=nothing,
89
source_id=nothing,
@@ -12,15 +13,15 @@
1213
document_id=nothing,
1314
)
1415
15-
- source::String
16+
- source::Source
1617
- source_id::String
1718
- url::String
1819
- created_at::String
1920
- author::String
2021
- document_id::String
2122
"""
2223
Base.@kwdef mutable struct DocumentChunkMetadata <: OpenAPI.APIModel
23-
source::Union{Nothing, String} = nothing
24+
source = nothing # spec type: Union{ Nothing, Source }
2425
source_id::Union{Nothing, String} = nothing
2526
url::Union{Nothing, String} = nothing
2627
created_at::Union{Nothing, String} = nothing
@@ -38,7 +39,7 @@ Base.@kwdef mutable struct DocumentChunkMetadata <: OpenAPI.APIModel
3839
end
3940
end # type DocumentChunkMetadata
4041

41-
const _property_types_DocumentChunkMetadata = Dict{Symbol,String}(Symbol("source")=>"String", Symbol("source_id")=>"String", Symbol("url")=>"String", Symbol("created_at")=>"String", Symbol("author")=>"String", Symbol("document_id")=>"String", )
42+
const _property_types_DocumentChunkMetadata = Dict{Symbol,String}(Symbol("source")=>"Source", Symbol("source_id")=>"String", Symbol("url")=>"String", Symbol("created_at")=>"String", Symbol("author")=>"String", Symbol("document_id")=>"String", )
4243
OpenAPI.property_type(::Type{ DocumentChunkMetadata }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_DocumentChunkMetadata[name]))}
4344

4445
function check_required(o::DocumentChunkMetadata)

src/generated/src/models/model_DocumentChunkWithScore.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Do not modify this file directly. Modify the OpenAPI specification instead.
33

44

5-
@doc raw"""
5+
@doc raw"""DocumentChunkWithScore
6+
67
DocumentChunkWithScore(;
78
id=nothing,
89
text=nothing,

0 commit comments

Comments
 (0)