malli

Marius 2025-05-22T14:42:44.223309Z

Hey there! My OpenAPI 3.1.0 spec generated from Malli is having some validation errors… My components all have a namespace prefix from the Malli registry like this:

components:
  schemas:
    lohnica.schema.validation/variable-data:
      type: object
      additionalProperties:
        type: object
        properties:
And this causes the following error with the spec validation (http://editor.swagger.io):
Semantic error at components.schemas.lohnica.schema.validation/variable-data
Component names can only contain the characters A-Z a-z 0-9 - . _
Is this a know problem? (Couldn’t find any related issue on Github) And is there a workaround for that? Thanks a lot in advance!

Marius 2025-05-28T11:44:37.643129Z

Thanks for the quick response! I was sure i was already on the latest version, sorry for that. Now after the update everything is working flawlessly, no validation errors any more! 👍

opqdonut 2025-05-28T11:57:26.474409Z

glad to know our fix was the right one for you 😊

2025-05-22T19:46:36.903339Z

Try bumping malli to 0.18.0 https://github.com/metosin/malli/pull/1183

2025-05-22T19:47:43.703279Z

Otherwise I'm guessing reitit.openapi needs a similar update.

opqdonut 2025-05-23T05:32:59.955879Z

yeah, this should get fixed by upgrading malli – no need to upgrade reitit

opqdonut 2025-05-23T05:33:48.838739Z

I just want to state that we were following the OAS 3.1.0 standard, which allows /, but for some reason the official json-schema (which the validators use) only allows [-._A-Za-z0-9] 😠

opqdonut 2025-05-23T05:34:07.137369Z

But malli 0.18.0 will format this as lohnica.schema.validation.variable-data