FHIR Chat · Exception generating OpenAPI · IG creation

Stream: IG creation

Topic: Exception generating OpenAPI


view this post on Zulip Brian Postlethwaite (Apr 03 2019 at 10:29):

I have a super simple Capability Statement in STU3 that it's crashing trying to generate the OpenAPI (which is what I'm really wanting to get at) any thoughts what this is?

Exception generating resource C:\git\ehpd-ig\resources\hcxdir-capability::CapabilityStatement/hcxdir-capability: null (00:02:56.0699sec)
java.lang.NullPointerException
at org.hl7.fhir.r5.openapi.BaseWriter.forceArray(BaseWriter.java:39)
at org.hl7.fhir.r5.openapi.BaseWriter.ensureArrayObject(BaseWriter.java:26)
at org.hl7.fhir.r5.openapi.Writer.server(Writer.java:62)
at org.hl7.fhir.r5.openapi.OpenApiGenerator.generate(OpenApiGenerator.java:36)
at org.hl7.fhir.igtools.publisher.Publisher.generateOutputsCapabilityStatement(Publisher.java:4599)
at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:4269)
at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:2924)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:627)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:555)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:5126)
org.hl7.fhir.r5.openapi.BaseWriter.forceArray(BaseWriter.java:39) (00:02:56.0784sec)
org.hl7.fhir.r5.openapi.BaseWriter.ensureArrayObject(BaseWriter.java:26) (00:02:56.0837sec)
org.hl7.fhir.r5.openapi.Writer.server(Writer.java:62) (00:02:56.0903sec)
org.hl7.fhir.r5.openapi.OpenApiGenerator.generate(OpenApiGenerator.java:36) (00:02:56.0924sec)
org.hl7.fhir.igtools.publisher.Publisher.generateOutputsCapabilityStatement(Publisher.java:4599) (00:02:56.0933sec)
org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:4269) (00:02:56.0950sec)
org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:2924) (00:02:56.0968sec)
org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:627) (00:02:56.0970sec)
org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:555) (00:02:56.0977sec)
org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:5126) (00:02:56.0985sec)

view this post on Zulip Jens Villadsen (Apr 03 2019 at 10:47):

You are probably missing an URL or a description: https://github.com/hapifhir/org.hl7.fhir.core/blob/3940aeb97696e49ae9a057d714ff45feb94d7cec/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/openapi/OpenApiGenerator.java#L36

view this post on Zulip Brian Postlethwaite (Apr 03 2019 at 10:51):

Thanks, will check both those.

view this post on Zulip Brian Postlethwaite (Apr 03 2019 at 11:06):

Thanks, removed the implementation section, and away it goes!

view this post on Zulip Jens Villadsen (Apr 03 2019 at 11:20):

Or better - throw in a PR and do some null checking

view this post on Zulip Brian Postlethwaite (Apr 03 2019 at 11:22):

Java not my native tongue ;)

view this post on Zulip Grahame Grieve (Apr 03 2019 at 19:31):

what was it you removed? the implemnentation section from where?

view this post on Zulip Brian Postlethwaite (Apr 03 2019 at 21:51):

The implementation property from my capability statement.

view this post on Zulip Grahame Grieve (Apr 03 2019 at 21:51):

hmm ok

view this post on Zulip Brian Postlethwaite (Apr 03 2019 at 21:52):

Will be padding that out again to be more complete then try putting it back.

view this post on Zulip Brian Postlethwaite (Apr 03 2019 at 21:53):

Only had implementation.description only, no url.

view this post on Zulip Grahame Grieve (Apr 04 2019 at 00:51):

hmm rather glaring bug by me right there. I'll do a new release and you can try again please

view this post on Zulip Jens Villadsen (Apr 05 2019 at 12:56):

@Grahame Grieve you'll fix the NP or would you like a PR?

view this post on Zulip Grahame Grieve (Apr 05 2019 at 20:34):

already fixed that one

view this post on Zulip Grahame Grieve (Apr 05 2019 at 20:34):

I think

view this post on Zulip Brian Postlethwaite (Jul 08 2019 at 03:48):

I've upgraded my IG to R4, and the OpenAPI generation seems to always produce STU3 output :sad:

view this post on Zulip Brian Postlethwaite (Jul 08 2019 at 04:20):

See here for an example.
http://build.fhir.org/ig/HL7/VhDir/vhdir-server.openapi.json

view this post on Zulip Grahame Grieve (Jul 08 2019 at 19:58):

I don't know what you mean 'STU3 output'?

view this post on Zulip Brian Postlethwaite (Jul 09 2019 at 03:30):

The schemas referenced by it are the STU3 ones, not the R4 ones.

view this post on Zulip Brian Postlethwaite (Jul 09 2019 at 03:30):

Even though it's an R4 IG/Capability statement.

view this post on Zulip Grahame Grieve (Jul 10 2019 at 12:57):

where?

view this post on Zulip Grahame Grieve (Jul 10 2019 at 12:59):

oh. in the refs. ok. can you make me a task?

view this post on Zulip Brian Postlethwaite (Jul 10 2019 at 20:41):

GF#22825

view this post on Zulip Brian Postlethwaite (Aug 05 2019 at 04:19):

Did this one get resolved @Grahame Grieve?

view this post on Zulip Grahame Grieve (Aug 05 2019 at 04:30):

yes

view this post on Zulip Brian Postlethwaite (Aug 05 2019 at 05:20):

Thanks heaps, will give it another test.


Last updated: Apr 12 2022 at 19:14 UTC