Code Monkey home page Code Monkey logo

zally-gradle-plugin's People

Contributors

dependabot[bot] avatar thiyagu06 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

hvaddi-cogito

zally-gradle-plugin's Issues

zallyLint is failing with Unable to load schema: http://swagger.io/v2/schema.json

The zallyLint is failing now because, in the src/main/resources/rules-config.conf, we have swagger pointing to "http://swagger.io/v2/schema.json" and its being redirected to "http://23.22.16.221/v2/schema.json".

This seems to be causing below issue.

2023-12-06T14:20:15.044+0530 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@52af4ba45 pairs: {GET /v2/schema.json HTTP/1.1: null}{User-Agent: Java/17.0.7}{Host: swagger.io}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
2023-12-06T14:20:15.279+0530 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@2772b71210 pairs: {null: HTTP/1.1 301 Moved Permanently}{Date: Wed, 06 Dec 2023 08:50:15 GMT}{Transfer-Encoding: chunked}{Connection: keep-alive}{Cache-Control: max-age=3600}{Expires: Wed, 06 Dec 2023 09:50:15 GMT}{Location: https://swagger.io/v2/schema.json}{Server: cloudflare}{CF-RAY: 831347bea8660664-IAD}{alt-svc: h3=":443"; ma=86400}
2023-12-06T14:20:15.298+0530 [ERROR] [org.zalando.zally.ruleset.zalando.UseOpenApiRule] Unable to load schema: http://swagger.io/v2/schema.json
java.lang.ClassCastException: class com.fasterxml.jackson.databind.node.NullNode cannot be cast to class com.fasterxml.jackson.databind.node.ObjectNode (com.fasterxml.jackson.databind.node.NullNode and com.fasterxml.jackson.databind.node.ObjectNode are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @4a9417a8)
        at org.zalando.zally.ruleset.zalando.UseOpenApiRule.getSchemaValidators(UseOpenApiRule.kt:91)
        at org.zalando.zally.ruleset.zalando.UseOpenApiRule.<init>(UseOpenApiRule.kt:38)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
        at org.zalando.zally.core.RulesManager$Companion$fromClassLoader$3.invoke(RulesManager.kt:19)
        at org.zalando.zally.core.RulesManager$Companion$fromClassLoader$3.invoke(RulesManager.kt:10)
        at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
        at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:786)
        at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:816)
        at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:807)
        at org.zalando.zally.core.RulesManager$Companion.fromClassLoader(RulesManager.kt:25)
        at org.thiyagu.zally.internal.ZallyFactory.<clinit>(ZallyFactory.kt:13)
        at org.thiyagu.zally.internal.ZallyLintTask.action(ZallyLintTask.kt:29)
        .....
        .....

I believe the URL needs to changed for Swagger maybe to this ().

Also, is there a way to let the zallyLint use schema_urls.openapi3 instead of swagger?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.