- Home
- Categories
- Technical Support
- Federation problems
Federation problems
-
Hi @jimmunroe@community.nodebb.org, are you able to see the message I sent you via chat (on your torontogamesweek site)?
I think you might also need to update to the latest development version.
The latest stable version has a regression that breaks federation (oops!)... we're cutting a fresh release tonight or tomorrow.
Feed RSS
Gli ultimi otto messaggi ricevuti dalla Federazione
-
Hi @jimmunroe@community.nodebb.org, are you able to see the message I sent you via chat (on your torontogamesweek site)?
I think you might also need to update to the latest development version.
The latest stable version has a regression that breaks federation (oops!)... we're cutting a fresh release tonight or tomorrow.
-
Konrad-Moskal yes, we're open to those updates to the OpenAPI spec.
If you use LLMs to write your commits we kindly ask you utilise the Assisted-By line in your commit messages.
-
julian I was able to make a request to write api: POST to create a user, using a master token :grin:
There are w few issues though, when using a token _uid, must be specified, shame it's not in the OA spec. Error handling is also tricky, since OA spec does not have all responses types, like 400 (https://docs.nodebb.org/api/write/#tag/users/paths/~1users~1/post).
I made good progress though so I am happy, it's a side project :) Thank you for your help. Will you guys look into improving these types or are open for contributions?
EDIT: actually _uid is not an issue, I created myself a token for admin user and it does what I want without needing to pass _uid
-
Konrad-Moskal okay, best of luck getting the schema to load :)
-
I am pointing to the input correcty. My LLM wanted me to extract TopicObjectSlim into its own file, it didn't help, I tried to inline TopicObjectSlim and that worked, but there was another error of the same kind just with a different object.
I was able to fix it, it seems at least, I'll need to test it. Adding a flag to skip validation allowed it to compete sucessfully: openapi-generator-cli generate -i src/specs/read.yaml -g typescript-fetch -o src/sdks/read --skip-validate-spec
-
I asked ChatGPT for thoughts (because I literally have no idea what to say), and it theorized that openapi-generator-cli was pointed to the file topic_id.yaml directly.
That would indeed cause issues because the file topic_id.yaml isn't meant to be loaded in isolation.
You need to point your tool at either read.yaml or write.yaml, which are the OpenAPI schema entry points for the two APIs NodeBB exposes.
-
julian full error included, I am trying to fix it but no luck so far, I already tried two code gen tools, none worked, have you got it working with any tools maybe?
[main] INFO o.o.c.l.PythonFastAPIServerCodegen - Skipping sorting of path operations, order matters, let the developer decide via their specification file. [main] WARN io.swagger.v3.parser.OpenAPIV3Parser - Exception while resolving: java.lang.RuntimeException: Could not find components/schemas/TopicObjectSlim in contents of ./read/topic/topic_id.yaml at io.swagger.v3.parser.ResolverCache.loadRef(ResolverCache.java:203) at io.swagger.v3.parser.processors.ExternalRefProcessor.processRefToExternalSchema(ExternalRefProcessor.java:95) at io.swagger.v3.parser.processors.ExternalRefProcessor.processRefSchema(ExternalRefProcessor.java:1047) at io.swagger.v3.parser.processors.ExternalRefProcessor.processSchema(ExternalRefProcessor.java:238) at io.swagger.v3.parser.processors.ExternalRefProcessor.processProperties(ExternalRefProcessor.java:283) at io.swagger.v3.parser.processors.ExternalRefProcessor.processSchema(ExternalRefProcessor.java:264) at io.swagger.v3.parser.processors.ExternalRefProcessor.processRefSchemaObject(ExternalRefProcessor.java:1009) at io.swagger.v3.parser.processors.ExternalRefProcessor.processPathItem(ExternalRefProcessor.java:350) at io.swagger.v3.parser.processors.ExternalRefProcessor.processRefToExternalPathItem(ExternalRefProcessor.java:325) at io.swagger.v3.parser.processors.PathsProcessor.processReferencePath(PathsProcessor.java:346) at io.swagger.v3.parser.processors.PathsProcessor.processPaths(PathsProcessor.java:68) at io.swagger.v3.parser.OpenAPIResolver.resolve(OpenAPIResolver.java:72) at io.swagger.v3.parser.OpenAPIResolver.resolve(OpenAPIResolver.java:59) at io.swagger.v3.parser.OpenAPIV3Parser.resolve(OpenAPIV3Parser.java:240) at io.swagger.v3.parser.OpenAPIV3Parser.readContents(OpenAPIV3Parser.java:183) at io.swagger.v3.parser.OpenAPIV3Parser.readLocation(OpenAPIV3Parser.java:97) at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:16) at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:687) at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:745) at org.openapitools.codegen.cmd.Generate.execute(Generate.java:527) at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32) at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66) [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] WARN o.o.codegen.utils.ModelUtils - Failed to get the schema name: ./components/schemas/UserObject.yaml#/UserObjectSlim [main] WARN o.o.codegen.utils.ModelUtils - Failed to get the schema name: ./components/schemas/UserObject.yaml#/UserObjectSlim [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. [main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for `null`. Default to String. Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI). | Error count: 1, Warning count: 0 Errors: -Could not find components/schemas/TopicObjectSlim in contents of ./read/topic/topic_id.yaml at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:718) at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:745) at org.openapitools.codegen.cmd.Generate.execute(Generate.java:527) at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32) at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66) ELIFECYCLE Command failed with exit code 1.You may ignore the error java.lang.RuntimeException: Could not find components/schemas/TopicObjectSlim in contents of ./read/topic/topic_id.yaml, I think I pasted the wrong thing
-
Hi Konrad-Moskal, this is the docs entry for that route: https://docs.nodebb.org/api/read/#tag/topics/paths/~1api~1topic~1{topic_id}~1{slug}~1{post_index}/get
It seems to resolve ok here.
In that file (topic_id.yaml) there is - $ref: ../../components/schemas/TopicObject.yaml#/TopicObjectSlim which seems to be where your parser is tripping up.
I am not certain what the issue is, because from that working directory, that relative path does resolve to the file in question.
Actually, I am not sure why it is looking for components/schemas/TopicObjectSlim, because the path is components/schemas/TopicObject.yaml#/TopicObjectSlim
Post suggeriti
-
Can't view some posts from Mastodon and issue on subject
Watching Ignoring Scheduled Pinned Locked Moved Technical Support0 Votes7 Posts8 Views -
Remote category does not federate and category rights
Watching Ignoring Scheduled Pinned Locked Moved Technical Support0 Votes4 Posts9 Views -
Office 365 With 2FA / OAuth Enabled Integration
Watching Ignoring Scheduled Pinned Locked Moved Technical Support0 Votes3 Posts7 Views -
Forum is noticeably slower on certain computers
Watching Ignoring Scheduled Pinned Locked Moved Technical Support0 Votes8 Posts7 Views