Skip to content

Keycloak OpenAPI fails for codegen #116

@Gottox

Description

@Gottox

What I tried:

cargo install schematools-cli
wget https://www.keycloak.org/docs-api/latest/rest-api/openapi.json
RUST_BACKTRACE=1 schematools-cli codegen openapi --template /dev/null --target-dir /tmp/kc openapi.json

thread 'main' panicked at /home/tox/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/schematools-0.19.2/src/codegen/jsonschema/types.rs:403:18:
Unsupported rename: ClientPoliciesRepresentationClientPolicyConditionRepresentationClientPolicyExecutorRepresentationClientProfileRepresentationMultivaluedHashMapStringComponentExportRepresentation2
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: schematools::codegen::jsonschema::types::Model::rename
   3: schematools::codegen::jsonschema::ModelContainer::add
   4: schematools::codegen::jsonschema::add_types
   5: schematools::tools::each
   6: schematools::tools::each
   7: schematools::tools::each
   8: schematools::tools::each
   9: schematools::tools::each_node
  10: schematools::codegen::openapi::extract
  11: schematools_cli::commands::codegen::Opts::run
  12: schematools_cli::commands::codegen::execute
  13: schematools_cli::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

What I expected:

Files, even if empty are created on /tmp/kc. The program does not panic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions