FHIR Chat · IGPublisher generated FHIR package package.json · shorthand

Stream: shorthand

Topic: IGPublisher generated FHIR package package.json


view this post on Zulip Brian Kaney (Oct 31 2020 at 17:30):

After generating an IG, starting with FSH tank, I see the generated package.json (in the FHIR package archive build/output/package.tgz) is set to my local file path, e.g.

"url": "file:///Users/bkaney/code/my-project/ig/build/output",

I would like to specify this but don't know how? I tried to adding a url property to my fsh/config.yaml, but it didn't have any affect. Any ideas?

view this post on Zulip Jose Costa Teixeira (Oct 31 2020 at 17:56):

I don't remember but you can check this :
Do you provide an implementationguide xml / json? or do you let sushi generate it for you?

view this post on Zulip Jose Costa Teixeira (Oct 31 2020 at 17:57):

if you provide the ig.xml, dows it have the url set? If not, does your sushi.config.yaml contain a canonical entry?

view this post on Zulip Jose Costa Teixeira (Oct 31 2020 at 17:57):

(I don't know if this has changed meanwhile, but I remember the same thing because my canonical was not set)

view this post on Zulip Brian Kaney (Oct 31 2020 at 17:57):

I do not have implementationguide, sushi is generating it. Yes, there is a canonical set.

view this post on Zulip Brian Kaney (Oct 31 2020 at 18:01):

I am using sushi 0.16.0, and IGPublisher 1.1.35

view this post on Zulip Nick Freiter (Nov 02 2020 at 13:10):

SUSHI doesn't generate that package.json, and I'm not sure which value the IG Publisher uses to populate that field. I see the same sort of local file path in the package.json when I build IGs locally, so I'm wondering if that is just the IG Publisher's convention for dev packages?

@Jose Costa Teixeira are you saying that the IG Publisher populates that field based on the "url" value in the ImplentationGuide resource? Because I have some locally built IGs that do have "url" set in the ImplementationGuide, but still have the local file path in the package.json.

view this post on Zulip Jose Costa Teixeira (Nov 02 2020 at 14:22):

No, @Nick Freiter I just vaguely remembered something possibly related

view this post on Zulip Jose Costa Teixeira (Nov 02 2020 at 14:22):

It is not improbable that I am just confusing everything.

view this post on Zulip Jose Costa Teixeira (Nov 02 2020 at 14:25):

I think this was the discussion I recalled:
https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/setting.20base.20url

view this post on Zulip Nick Freiter (Nov 02 2020 at 14:44):

I think that discussion is a bit different than what's going on here. It looked like in that thread there was an issue with the package.json that SUSHI used to use as an input, which is now sushi-config.yaml. But in this case, the issue is with the package.json generated by the IG Publisher for the package.tgz file. This documentation seems to indicate that that value should get set based on the manifest.rendering property on the ImplementationGuide resource, but I'm having trouble replicating that for a locally built package.

view this post on Zulip Brian Kaney (Nov 02 2020 at 17:03):

FWIW, the generated IG resource that I see does not have manifest.rendering property.

view this post on Zulip Nick Freiter (Nov 02 2020 at 17:11):

It's possible the manifest.rendering is ignored when building locally. I've been unable to get the url in the package.json to have a value different from the local file path. This might be worth bringing up in the #IG creation channel? Once we know how the IG Publisher sets that url in package.json, we could determine if there is anything SUSHI can do to put the canonical given in config.yaml where the IG Publisher is expecting it.

view this post on Zulip Brian Kaney (Nov 02 2020 at 23:10):

I attempted to frame the question there...

view this post on Zulip Brian Kaney (Nov 03 2020 at 12:52):

@Nick Freiter Lloyd said "It should come from the ImplementationGuide.url value"

view this post on Zulip Nick Freiter (Nov 03 2020 at 13:39):

Gotcha, continuing the conversation there.

view this post on Zulip Nick Freiter (Nov 03 2020 at 13:40):

The other thread, for anyone else who is interested: https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/Setting.20.22url.22.20in.20package.2Ejson

view this post on Zulip Brian Kaney (Nov 04 2020 at 20:32):

Hi @Nick Freiter -- not sure exactly how to parse Grahame's response here, but maybe this could be useful information w.r.t. sushi tooling? Or is this something that sushi shouldn't be involved with?

view this post on Zulip Nick Freiter (Nov 04 2020 at 20:37):

Hm yeah I see. I've asked if command line option is truly the only way to do it. If that's the case, then no, I don't think this is something SUSHI would be able to take care of. I don't think we want to get into the business of messing with the command line params of the IG publisher. But, if there is some value that can be set in the ImplementationGuide resource, then we could look into having SUSHI set that value based on the given canonical.

view this post on Zulip Brian Kaney (Nov 05 2020 at 16:19):

@Nick Freiter One idea might be a way to set IGPublish CLI flags/options (in config.yaml)?

view this post on Zulip Jose Costa Teixeira (Nov 05 2020 at 16:42):

sushi cannot set the flags for the IGPublisher because sushi does not call the publisher. It's the publisher that calls sushi

view this post on Zulip David Pyke (Nov 05 2020 at 16:43):

more settings for fsh.ini!

view this post on Zulip Jose Costa Teixeira (Nov 05 2020 at 16:43):

what setting would that be? fsh.ini is for sushi settings

view this post on Zulip David Pyke (Nov 05 2020 at 16:46):

Currently it only sets the sushi version that the publisher will use. However, it could be other runtime settings (or could be set in ig.ini)

view this post on Zulip Chris Moesel (Nov 05 2020 at 16:57):

In this case @Brian Kaney wants to affect the IG Publisher, not SUSHI (since SUSHI does not generate package.json), so ig.ini (or a parameter in the IG JSON) would be more appropriate than fsh.ini.


Last updated: Apr 12 2022 at 19:14 UTC