fix actor specification tests

This commit is contained in:
timurgordon
2025-01-03 01:47:33 -05:00
parent d5af1d19b8
commit 6ba89a8b9c
5 changed files with 14 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
module specification
import freeflowuniverse.herolib.core.code { Struct, Function }
import freeflowuniverse.herolib.schemas.openrpc { ContentDescriptor, Error }
import freeflowuniverse.herolib.schemas.openrpc { ContentDescriptor, ErrorSpec }
import freeflowuniverse.herolib.schemas.openapi { OpenAPI, Info, ServerSpec, Components, Operation, PathItem, PathRef }
import freeflowuniverse.herolib.schemas.jsonschema {Schema, Reference, SchemaRef}
@@ -379,7 +379,7 @@ const actor_spec = specification.ActorSpecification{
})
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 400
message: 'Invalid request'
}
@@ -393,7 +393,7 @@ const actor_spec = specification.ActorSpecification{
description: 'The response of the operation.'
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 400
message: 'Invalid input'
}
@@ -421,7 +421,7 @@ const actor_spec = specification.ActorSpecification{
})
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 404
message: 'Pet not found'
}
@@ -446,7 +446,7 @@ const actor_spec = specification.ActorSpecification{
description: 'The response of the operation.'
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 404
message: 'Pet not found'
}
@@ -488,7 +488,7 @@ const actor_spec = specification.ActorSpecification{
})
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 404
message: 'Order not found'
}
@@ -513,7 +513,7 @@ const actor_spec = specification.ActorSpecification{
description: 'The response of the operation.'
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 404
message: 'Order not found'
}

View File

@@ -1,7 +1,6 @@
module specification
import freeflowuniverse.herolib.schemas.openrpc { OpenRPC, Method, ContentDescriptor, ErrorSpec }
import freeflowuniverse.herolib.core.code { Struct, Function }
import freeflowuniverse.herolib.schemas.jsonschema { Reference, Schema, SchemaRef }
// Helper function: Convert OpenRPC Method to ActorMethod

View File

@@ -1,7 +1,7 @@
module specification
import freeflowuniverse.herolib.core.code { Struct, Function }
import freeflowuniverse.herolib.schemas.openrpc { ContentDescriptor, Error }
import freeflowuniverse.herolib.schemas.openrpc { ContentDescriptor, ErrorSpec }
import freeflowuniverse.herolib.schemas.openapi { OpenAPI, Info, ServerSpec, Components, Operation, PathItem, PathRef }
import freeflowuniverse.herolib.schemas.jsonschema {Schema, Reference, SchemaRef}
@@ -379,7 +379,7 @@ const actor_spec = specification.ActorSpecification{
})
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 400
message: 'Invalid request'
}
@@ -393,7 +393,7 @@ const actor_spec = specification.ActorSpecification{
description: 'The response of the operation.'
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 400
message: 'Invalid input'
}
@@ -421,7 +421,7 @@ const actor_spec = specification.ActorSpecification{
})
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 404
message: 'Pet not found'
}
@@ -446,7 +446,7 @@ const actor_spec = specification.ActorSpecification{
description: 'The response of the operation.'
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 404
message: 'Pet not found'
}
@@ -488,7 +488,7 @@ const actor_spec = specification.ActorSpecification{
})
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 404
message: 'Order not found'
}
@@ -513,7 +513,7 @@ const actor_spec = specification.ActorSpecification{
description: 'The response of the operation.'
}
errors: [
openrpc.Error{
openrpc.ErrorSpec{
code: 404
message: 'Order not found'
}

View File

@@ -1,7 +1,6 @@
module specification
import freeflowuniverse.herolib.core.code { Struct, Function }
import freeflowuniverse.herolib.schemas.jsonschema { Schema }
import freeflowuniverse.herolib.schemas.openrpc {ContentDescriptor, ErrorSpec}
pub struct ActorSpecification {

View File

@@ -1,9 +1,7 @@
module specification
import freeflowuniverse.herolib.core.code { Struct, Function }
import freeflowuniverse.herolib.schemas.jsonschema { Schema, SchemaRef }
import freeflowuniverse.herolib.schemas.openapi { Operation, Parameter, OpenAPI, Components, Info, PathItem, ServerSpec }
import freeflowuniverse.herolib.schemas.openrpc { ContentDescriptor, ErrorSpec }
// Converts ActorSpecification to OpenAPI
pub fn (s ActorSpecification) to_openapi() OpenAPI {