Evgeny Shvarov · May 12, 2020 go to post

Hi Tani!

In fact /_spec endpoint is not a part of Open API specification. I was wrong.

But this approach to tell where is the Open API specification could be found is quite popular, so InterSystems spec-first /api/mgmnt/ service generates such an endpoint.

That's why we did this for the REST-API template too.

Evgeny Shvarov · May 12, 2020 go to post

We updated the test zpm server to 1.0.5 version and now the problem with updating the same-version packages is solved. 

Evgeny Shvarov · May 10, 2020 go to post

Regarding the application error.

I installed the package via ZPM:

% docker run --name my-iris -d --publish 9091:51773 --publish 9092:52773 intersystemsdc/irishealth-community:2020.2.0.196.0-zpm

% docker exec -it my-iris iris session IRIS

Node: 18aa9f2b084c, Instance: IRIS

USER>zpm

zpm: USER>docker exec -it my-iris iris session IRIS

zpm: USER>install sys-perf-restapi                 

[sys-perf-restapi] Reload START

[sys-perf-restapi] Reload SUCCESS

[sys-perf-restapi] Module object refreshed.

[sys-perf-restapi] Validate START

[sys-perf-restapi] Validate SUCCESS

[sys-perf-restapi] Compile START

[sys-perf-restapi] Compile SUCCESS

[sys-perf-restapi] Activate START

[sys-perf-restapi] Configure START

[sys-perf-restapi] Configure SUCCESS

[sys-perf-restapi] Activate SUCCESS

zpm: USER>

Then opened http://localhost:9092/pbuttonsUI/index.csp
and got this error.

The application error log is empty:

Evgeny Shvarov · May 10, 2020 go to post

Hi Tani!

About swagger-spec.

According to the Open-API standard your API should expose /_spec end-point, where it exports JSON in Open API format.

I tried to refer to /pbuttons/_spec - and got 404.

To make this happen you need to introduce a GET endpoint /_spec and a method that implements it. Here is an example of the endpoint and the method which could be almost the same for any REST API.

Evgeny Shvarov · May 10, 2020 go to post

Made an update on technology bonus and sample application:

Technology bonuses

1. Docker container - 1 expert point

The application gets a 'Docker container' bonus if it uses InterSystems IRIS  running in a docker container. 

When cloned or downloaded the application should be runnable with:

$ docker-compose up -d

Sample Applications
Native API Contest Template - demonstrates all 4 NativeAPIs setup and work. The template satisfies the "Docker container" technology bonus. 

Evgeny Shvarov · May 7, 2020 go to post

Thanks, @Guillaume Rongier for sharing this helpful lib!

And I appreciate you noticed how easy the code could be tested with ZPM. Like this ZPM feature. 

USER>zpm
zpm:USER>module-action objectscript-json-patch test

BTW, module-action could be omitted to have:

zpm:USER>objectscript-json-patch test

Join to chat about ZPM in Discord.

Evgeny Shvarov · May 6, 2020 go to post

Hi Tani!

I'm having the error when open the UI.

Also, it's not clear where I can find the Open API spec endpoint or UI.

Evgeny Shvarov · May 6, 2020 go to post

We are fixing this now with Eventbrite. Something went wrong on their side. Sorry for the inconvenience.

Evgeny Shvarov · May 5, 2020 go to post

Hi folks!

We changed the test server for test registry again!)

Now the proper command to switch to TEST Registry is:

repo -n registry -r -url https://test.pm.community.intersystems.com/registry/ -user test -pass PassWord42

E.g.:

zpm:USER>repo -n registry -r -url https://test.pm.community.intersystems.com/registry/ -user test -pass PassWord42

Hope we'll not change it again soon )

And of course, you are very welcome to set up your own registry)

Stay tuned!

Evgeny Shvarov · Apr 30, 2020 go to post

Thanks, Peter! Indeed, there is a 3 days delay which lets our DC Moderators team decide on the nature of the post and to let community vote positively or negatively. You don't get badges and points for negatively voted posts.

Evgeny Shvarov · Apr 28, 2020 go to post

Hi folks! 

If you get an error while publishing:

Publish FAILURE - ERROR #5001: Publishing module, something went wrong.

That means you need to bump the module version - it doesn't allow (at least now) to overwrite already published module version.

Evgeny Shvarov · Apr 25, 2020 go to post

Oliver! Thanks for sharing! I'm sure you can estimate for yourself if this is the value, but personally I see a lot of value in the fact that engineers united to share experience and to help solve problems. And congrats to you with making REST API and JSON work for you! 

And I welcome everyone to Discord chat - we are sharing experience and having fun there!

Evgeny Shvarov · Apr 24, 2020 go to post

Hi David!

Could you please commit it and push to the repo on GitHub and  I'll try on my laptop?

If not possible - join the discord.

Evgeny Shvarov · Apr 24, 2020 go to post

Added the information about Sample application:

Sample application

Here is the sample template application objectscript-docker-rest-template

It gets one technology bonus point because it could be also installed as ZPM module with the command:

zpm:USER>install rest-template

And it gets another technology bonus because it exposes swagger spec on localhost:port/crud/_spec.

REST API Documentation could be published by Postman or can be viewed by any swaggerUI service. E.g. with addons as iris-expolrer, or swagger-ui package.

You can use this application as a template.