Skip to content

Converting an .xsd file that uses a type from another .xsd file? #569

Description

@andrew-otiv

I have xsd files that use types defined in other xsd files, and I would like to generate (also inter-dependent) proto files for them.

schema2proto only takes a single xsd file on the command line.

I hit an undefined type error for the types that are defined outside the xsd file that was passed to schema2proto:
"[main] ERROR no.entur.schema2proto.generateproto.SchemaParser - undefined simple or complex type ..."

I verified using strace that schema2proto isn't attempting to load the other xsd files that contain the required types.

I tried setting --customImportLocations and --customImports, but that didn't change the xsd schema parsing behavior.

Is schema2proto capable of converting xsd files that depend on types defined in other .xsd files, and if so, how do I configure schema2proto to find the relevant files?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions