Skip to content

Commit

Permalink
Fix OpenAPI spec generation
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDiekmann committed Sep 17, 2024
1 parent b8a643d commit 0958230
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
15 changes: 15 additions & 0 deletions apps/hash-graph/libs/api/openapi/openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions apps/hash-graph/libs/api/src/rest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ use axum::{
use error_stack::{Report, ResultExt};
use graph::{
ontology::{domain_validator::DomainValidator, Selector},
store::{error::VersionedUrlAlreadyExists, Store, StorePool, TypeFetcher},
store::{
error::VersionedUrlAlreadyExists, query::ParameterConversion, Store, StorePool, TypeFetcher,
},
subgraph::{
edges::{
EdgeResolveDepths, GraphResolveDepths, KnowledgeGraphEdgeKind, OntologyEdgeKind,
Expand Down Expand Up @@ -725,7 +727,8 @@ impl Modify for FilterSchemaAddon {
ObjectBuilder::new()
.title(Some("ParameterExpression"))
.property("parameter", Any::schema().1)
.required("parameter"),
.required("parameter")
.property("convert", ParameterConversion::schema().1),
)
.build(),
)
Expand Down
2 changes: 1 addition & 1 deletion apps/hash-graph/libs/graph/src/ontology/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub enum DataTypeQueryPath<'p> {
/// let path = Filter::<DataTypeWithMetadata>::deserialize(filter_value)?;
/// assert_eq!(path, Filter::Equal(
/// Some(FilterExpression::Path{ path: DataTypeQueryPath::Version }),
/// Some(FilterExpression::Parameter { parameter: Parameter::Text(Cow::Borrowed("latest"))}))
/// Some(FilterExpression::Parameter { parameter: Parameter::Text(Cow::Borrowed("latest")), convert: None }))
/// );
/// # Ok::<(), serde_json::Error>(())
/// ```
Expand Down
2 changes: 1 addition & 1 deletion apps/hash-graph/libs/graph/src/ontology/entity_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub enum EntityTypeQueryPath<'p> {
/// let path = Filter::<EntityTypeWithMetadata>::deserialize(filter_value)?;
/// assert_eq!(path, Filter::Equal(
/// Some(FilterExpression::Path { path: EntityTypeQueryPath::Version }),
/// Some(FilterExpression::Parameter { parameter: Parameter::Text(Cow::Borrowed("latest"))}))
/// Some(FilterExpression::Parameter { parameter: Parameter::Text(Cow::Borrowed("latest")), convert: None }))
/// );
/// # Ok::<(), serde_json::Error>(())
/// ```
Expand Down
5 changes: 4 additions & 1 deletion apps/hash-graph/libs/graph/src/store/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ use serde::{
};

pub use self::{
filter::{Filter, FilterExpression, Parameter, ParameterConversionError, ParameterList},
filter::{
Filter, FilterExpression, Parameter, ParameterConversion, ParameterConversionError,
ParameterList,
},
path::{JsonPath, PathToken},
};

Expand Down

0 comments on commit 0958230

Please sign in to comment.