davidmoten / openapi-to-plantuml-aws-api

Apache License 2.0
6 stars 0 forks source link

Tried to generate the diagram for Monta API #43

Open nicostubi opened 1 year ago

nicostubi commented 1 year ago

Hello,

I've tried to this OpenAPI definition without success: https://docs.partner-api.monta.com/openapi/64f090e85ab6510044977858

The error was:

Returned status code: 500 { "errorMessage": "ServerException: java.lang.Boolean cannot be cast to io.swagger.v3.oas.models.media.Schema", "errorType": "java.lang.RuntimeException", "stackTrace": [ "com.github.davidmoten.oas3.puml.api.Handler.handleRequest(Handler.java:51)", "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)", "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)", "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)", "java.lang.reflect.Method.invoke(Method.java:498)" ], "cause": { "errorMessage": "java.lang.Boolean cannot be cast to io.swagger.v3.oas.models.media.Schema", "errorType": "java.lang.ClassCastException", "stackTrace": [ "com.github.davidmoten.oas3.internal.Common.lambda$toModelClass$1(Common.java:136)", "java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671)", "com.github.davidmoten.oas3.internal.Common.toModelClass(Common.java:81)", "com.github.davidmoten.oas3.internal.ComponentsHelper.lambda$toModel$0(ComponentsHelper.java:25)", "java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)", "java.util.Iterator.forEachRemaining(Iterator.java:116)", "java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)", "java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)", "java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)", "java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)", "java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)", "java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:541)", "com.github.davidmoten.oas3.internal.ComponentsHelper.toModel(ComponentsHelper.java:27)", "com.github.davidmoten.oas3.puml.Converter.openApiToPuml(Converter.java:64)", "com.github.davidmoten.oas3.puml.Converter.openApiToPuml(Converter.java:57)", "com.github.davidmoten.oas3.puml.api.Handler.handleRequest(Handler.java:44)", "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)", "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)", "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)", "java.lang.reflect.Method.invoke(Method.java:498)" ] } }

BR Nicolas

davidmoten commented 4 months ago

Thanks for the report. I think this was fixed a little while ago. I'll try your openapi definition shortly.

davidmoten commented 4 months ago

I've updated the aws service with the latest version of openapi-to-plantuml. Please try that. I would try your Monta openapi definition but I get a 404 from that link (requires login?). BTW this is worth a try as well (gives separate diagrams per operation): https://openapi-codegen.davidmoten.org/prod/site/index.html

davidmoten commented 4 months ago

I did find a link that works, it's a largish api well suited to operation-specific images. https://openapi-codegen.davidmoten.org/prod/site/index.html works just fine. Images attached. I've also attached the all-in-one svg as well.