You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RFC 6901 requires that when evaluating a JSON pointer expression, the values ~0 and ~1 must be unescaped to ~ and / respectively. swagger-parser doesn't do that, so examples like this don't work:
$ brew info swagger-codegen
swagger-codegen: stable 2.2.0 (bottled), HEAD
Generation of client and server from Swagger definition
http://swagger.io/swagger-codegen/
/usr/local/Cellar/swagger-codegen/2.2.0 (5 files, 14.2M) *
Poured from bottle on 2016-08-19 at 14:53:05
From: /~https://github.com/Homebrew/homebrew-core/blob/master/Formula/swagger-codegen.rb
==> Dependencies
Build: maven ✔
$ swagger-codegen generate -l java -i https://gist.githubusercontent.com/jancona/5f6e83aa138e61bbc10b0e25dd0d2298/raw/41a0ea6f791aa2779f607e5348dfc5d634097238/main.yaml
[main] INFO io.swagger.parser.Swagger20Parser - reading from https://gist.githubusercontent.com/jancona/5f6e83aa138e61bbc10b0e25dd0d2298/raw/41a0ea6f791aa2779f607e5348dfc5d634097238/main.yaml
Exception in thread "main" java.lang.RuntimeException: Could not find paths/~1foo in contents of ./child.yaml
at io.swagger.parser.ResolverCache.loadRef(ResolverCache.java:115)
at io.swagger.parser.processors.PathsProcessor.processPaths(PathsProcessor.java:72)
at io.swagger.parser.SwaggerResolver.resolve(SwaggerResolver.java:40)
at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:66)
at io.swagger.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:390)
at io.swagger.codegen.cmd.Generate.run(Generate.java:221)
at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:36)
$
$ swagger -V
1.0.0-beta.2
$ swagger validate https://gist.githubusercontent.com/jancona/5f6e83aa138e61bbc10b0e25dd0d2298/raw/41a0ea6f791aa2779f607e5348dfc5d634097238/main.yaml
https://gist.githubusercontent.com/jancona/5f6e83aa138e61bbc10b0e25dd0d2298/raw/41a0ea6f791aa2779f607e5348dfc5d634097238/main.yaml is valid
The text was updated successfully, but these errors were encountered:
RFC 6901 requires that when evaluating a JSON pointer expression, the values
~0
and~1
must be unescaped to~
and/
respectively. swagger-parser doesn't do that, so examples like this don't work:The text was updated successfully, but these errors were encountered: