Skip to content

Fails to convert if the output file is in a symlink #12

@jebbench

Description

@jebbench

Using version 1.1.0 I am unable to generate output in a symlinked directory - it appears that Swagger2Markup doesn't believe that the symlink is a valid directory for writing to and attempts to create it.

18:12:40 00:01         [swagger_markup]
                       ==== stderr ====
                       java.lang.RuntimeException: Failed create directory
                       	at io.github.swagger2markup.markup.builder.internal.AbstractMarkupDocBuilder.writeToFileWithoutExtension(AbstractMarkupDocBuilder.java:500)
                       	at io.github.swagger2markup.markup.builder.internal.AbstractMarkupDocBuilder.writeToFile(AbstractMarkupDocBuilder.java:528)
                       	at io.github.swagger2markup.internal.document.MarkupDocument.writeToFile(MarkupDocument.java:48)
                       	at io.github.swagger2markup.Swagger2MarkupConverter.toFile(Swagger2MarkupConverter.java:205)
                       	at io.github.swagger2markup.cli.Application.run(Application.java:84)
                       	at io.github.swagger2markup.cli.Application.main(Application.java:61)
                       	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                       	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                       	at java.lang.reflect.Method.invoke(Method.java:498)
                       	at com.martiansoftware.nailgun.NGSession.run(NGSession.java:280)
                       Caused by: java.nio.file.FileAlreadyExistsException: /home/jbench/Code/faber-mono/.pants.d/swagger-doc/swagger-doc/f5b17acf873b/services.auth.swagger-doc/current
                       	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88)
                       	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
                       	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
                       	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
                       	at java.nio.file.Files.createDirectory(Files.java:674)
                       	at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
                       	at java.nio.file.Files.createDirectories(Files.java:727)
                       	at io.github.swagger2markup.markup.builder.internal.AbstractMarkupDocBuilder.writeToFileWithoutExtension(AbstractMarkupDocBuilder.java:498)
                       	... 10 more
                       
                       ==== stdout ====
                       18:12:40.259 [NGSession 13: 127.0.0.1: io.github.swagger2markup.cli.Application] INFO  io.swagger.parser.Swagger20Parser - reading from /home/jbench/Code/faber-mono/services/auth/auth.swagger.json
                       18:12:40.264 [NGSession 13: 127.0.0.1: io.github.swagger2markup.cli.Application] DEBUG i.s.m.properties.PropertyBuilder - no property for null, null
                       18:12:40.265 [NGSession 13: 127.0.0.1: io.github.swagger2markup.cli.Application] WARN  io.swagger.util.PropertyDeserializer - no property from null, null, {ENUM=null, TITLE=null, DESCRIPTION=null, DEFAULT=null, PATTERN=null, DESCRIMINATOR=null, MIN_ITEMS=null, MAX_ITEMS=null, MIN_PROPERTIES=null, MAX_PROPERTIES=null, MIN_LENGTH=null, MAX_LENGTH=null, MINIMUM=null, MAXIMUM=null, EXCLUSIVE_MINIMUM=null, EXCLUSIVE_MAXIMUM=null, UNIQUE_ITEMS=null, EXAMPLE=null, TYPE=null, FORMAT=null, READ_ONLY=null, VENDOR_EXTENSIONS={}}

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