Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image view from SVG not working #249

Closed
jbindinga opened this issue Feb 14, 2024 · 1 comment
Closed

Image view from SVG not working #249

jbindinga opened this issue Feb 14, 2024 · 1 comment
Labels

Comments

@jbindinga
Copy link

Description

We are using structurizr lite and on-premise for documentation and want to add some code level diagram to our diagrams. This works using an image view with a PNG, however with an SVG file we are getting an exception indicating image == null.

Steps to reproduce

  1. Add an image view with an SVG file link
    I have added a code sample with an SVG image and a PNG image. The view with the PNG image works as expected, the SVG does not.
  2. Open structurizr Lite
  3. You get the error:
    S.l.c.w.FileSystemWorkspaceComponentImpl : com.structurizr.dsl.StructurizrDslParserException: image == null!

Screenshot

No response

Code sample

workspace “Example image view” “” {
  model {
    softwareSystem “System” {
      container “Container” {
        component “Component” {
        }
      }
    }
  }
  views {
    image “Component” “ComponentSVGView” {
      title “Example image view from SVG”
      image Component.svg
    }

    image “Component” “ComponentPNGView” {
      title “Example image view from PNG”
      image Component.png
    }
  }
}

Configuration

Structurizr Lite

  • build: 2024.01.02 (2024-01-02T10:45:12Z)
  • Structurizr-java: v1.29.0
  • Structurizr-dsl: v1.35.0
  • Structurizr-import: v1.7.0
  • Structurizr-graphiz: v2.2.2

Severity

Minor

Priority

I have no budget and there's no rush, please fix this for free

More information

No response

@jbindinga jbindinga added the bug label Feb 14, 2024
@simonbrowndotje
Copy link
Contributor

Code sample (the example above is invalid for several reasons):

workspace "Example image view" "" {
  model {
    softwareSystem "System" {
      container "Container" {
        c = component "Component" {
        }
      }
    }
  }
  views {
    image c "ComponentSVGView" {
      title "Example image view from SVG"
      image component.svg
    }

    image c "ComponentPNGView" {
      title "Example image view from PNG"
      image component.png
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants