How do I validate a IIIF manifest? - validation

I am trying to display a manifest from another IIIF server in my local viewer, but it doesn't seem to be working. How do I confirm the manifest is valid/not broken?

There's a validator on the IIIF website that will validate IIIF Manifests, at http://iiif.io/api/presentation/validator/service/.
If you've got a lot of manifests to test, you can also download the validator itself at http://github.com/IIIF/metadata-api/.

There's also the Tripoli manifest validator: https://github.com/DDMAL/tripoli
And a live version of Tripoli: https://validate.musiclibs.net/

Related

How do I include my Swagger Hub API definition in a project deployed on Heroku?

I have written the logic for a backend e-commerce REST API, and I have documented it here:
https://app.swaggerhub.com/apis-docs/chris-larham-1983/e-Commerce_Registration_Customers_Addresses_Orders/0.1#/. I would like to include this specification in my project that is deployed on Heroku so that the project and documentation are in one place.
I have configured the Heroku database, populated the 'customers', 'orders', 'products', and 'addresses' table with sample data, and the specified endpoints are working as specified in the document - for example, https://codecademy-e-commerce-rest-api.herokuapp.com/api/products.
So far I have tried downloading the documentation from within my Swagger Hub account in 'html', 'html2', and 'dynamic html' formats, as I thought I would just include a .html document in my project. However, these downloaded documents do not closely resemble the documentation as linked above; the formatting is very different and does not look as professional.
Does anybody know I could include my Swagger Hub API definition in my project so that the documentation and project are both hosted on Heroku?
Thanks in advance for any help/pointers to tutorials.
After a couple of hours of searching and configuring, I have solved this problem thanks to an npm package called swagger-ui-express. This package can be found here: https://www.npmjs.com/package/swagger-ui-express.
I downloaded my API specification in the format JSON resolved and added it to my project as a file named swagger.json. Then I followed the configuration information in the swagger-ui-express documentation, uploaded to heroku, and it worked!
The lines of code I added in index.js were:
const swaggerUi = require('swagger-ui-express');
const swaggerDocument = require('./swagger.json');
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument));
I hope this helps somebody in the future :)

Meteor Npm-module client-side?

Is it possible to use Npm-Modules on client-side?
More specifically:
I want to use node.js built-in crypto-module for encrypting a password the user enters and then send the encrypted password with a signature(/hmac) to my server.
I need to do it that way, because I must be able to retrieve the original password server-side, because afterwards I'm going to send it to a ldap-server, because the user should authenticate with the same username/password he is registered with on that server.
This is what I did:
created in packages/crypto/:
-package.js:
Package.on_use(function(api) { api.add_files('crypto.js',['server','client']);});
-crypto.js:
crypto = Npm.require("crypto");
It works fine on the server, but on the client it says "Reference Error: Npm is not defined".
So, is it possible to use the crypto-module on client-side?
Are there any alternatives for achieving this goal?
Thank you!
Edit:
Is there any good alternative for getting the password to the server in a secure way, so that the server can retrieve the original password?
I think doing the ldap()-request on the client-side (like:
if(checkLdap(usrname,password)){<login>} else{fail}) can be easily bypassed?
You can try to add the js-files you need on client-side from .npm folder under crypto's package directory.
So, your package.js file might look like this:
Package.describe({
summary: 'Description of your crypto package'
});
Npm.depends({
'crypto': '1.0.0'
});
Package.on_use(function (api) {
api.add_files('crypto.js', 'server');
api.add_files('.npm/node_modules/crypto/crypto.js', 'client');
});
You can use https://github.com/elidoran/cosmos-browserify now to archive this. I used wrapped packages before and it was real pain to update them and to create new ones. Now with browserify support I can include library with just several lines of code. See their example how to do it. I don't publish it here as it may be subject of change.
Its not possible to use Npm modules on the client side since Npm modules are extensions via node.js which only runs on the server end.
If you want to use a file like crypto you would have to make a client side only version and put it in /client/lib of your Meteor app
While this may be possible officially, Meteor doesn't support this.
You would have to include requirejs manually using this project: https://github.com/apendua/require
You can use browserify to build a .js bundle with all all the Npm modules you want on the client side. See:
2013 Meteor NPM Packages

AppHarbor Web.config transforms not being applied

I am developing an application in ServiceStack and am trying to sort out deployment on AppHarbor, however for some reason my web.config transforms are not being applied.
I had originally a Web.AppHarbor.config file and changed the Environment Setting to "AppHarbor" - once this failed to work after several updates, I gave up and changed the Environment setting to "Release" and copied the desired transformations into the Web.Release.Config file.
App gets deployed OK but config settings do not reflect the values in the transform file (I verify this by login on with twitter and seeing the callback url for Twitter Auth still tries to redirect me to localhost, which is one of the settings I change in my transform file)
I have also tried the transform tester tool and all works as expected.
Manually publishing the web application to a local folder correctly applies the transformations according to the selected configuration
Does anyone have this working? Is there something obvious I'm missing?
Thanks
It sounds like the Web.Release.config file is not included in the build output. You need to set the Build Action attribute to Content to include it in the build output.
You can confirm whether the file is included in the output by downloading the build from the log page.
I stumbled across this post because I was seeing the same lack of action myself. Upon closer inspection (about 15 times that is) of my Web.Release.config I realized one of the nodes in my config file was not marked xdt:Transform="Replace". Unsurprisingly it did nothing when deployed.

Jenkins CI, how to add Importance property to EMail header?

I would like Jenkins emails to have "Importance" icon (in Outlook)
If I generate the email manually - I can achieve this by adding these properties in the SMTP header:
Priority:High
Importance:high
Is there way to add them into Jenkins email headers? I could not find any plugin or option doing that :(
No, this isn't currently possible, but you could probably add this to the Email-ext plugin, which has configuration options for some other headers.
There's a ticket requesting this feature in the Jenkins emailExt project: https://issues.jenkins.io/browse/JENKINS-69592?jql=labels%20%3D%20email-ext
One user listed a workaround in the comments there:
Code is just adding a presendScript presendScript: '''msg.addHeader("X-Priority", "1")''')

How entity edit URL from within plug-in in MS Dynamics CRM 4.0

I would like to have a workflow create a task, then email the assigned user that they have a new task and include a link to the newly created task in the body of the email. I have client side code that will correctly create the edit URL, using the entities GUID and stores it in a custom attribute. However, when the task is created from within a workflow, the client script isn't run.
So, I think a plug-in should work, but I can't figure out how to determine the URL of the CRM installation. I'm authoring this in a test environment and definitely don't want to have to change things when I move to production. I'm sure I could use a config file, but seems like the plug-in should be able to figure this out at runtime.
Anyone have any ideas how to access the URL of the crm service from within a plug-in? Any other ideas?
There is no simple way to do this. However, there is one.
The MSCRM_Config is the deployment database that handle physical deployment properties, like the URL from which users are accessing the CRM deployment. The url that you might want is the one stored in "ADWebApplicationRootDomain", in the MSCRM_CONFIG.dbo.DeploymentProperties table. You may need some permission to access this database.
Note that this doesn't work in a deployment that is an Internet Facing Deployment.
Another way could be to query the discovery service to retrieve the same information (in the case that you are on the Online edition of MSCRM4).
What do you mean by "change things"?
If you create a custom workflow assembly, you can give it a server url input. Once you register it with CRM, you can simply type in the server url when you configure the workflow. You'll have to update the url for any workflows that use the custom workflow assembly once you move to production, but you'll only have to do that once.
My apologies if this is what you meant you wanted to avoid.
Edit: Sounds like you may be able to use the CustomConfiguration attribute when you register the plugin. Here's some more info.
http://blogs.msdn.com/crm/archive/2008/10/24/storing-configuration-data-for-microsoft-dynamics-crm-plug-ins.aspx
String Url = ((string)(Registry.LocalMachine.OpenSubKey(
"Software\\Microsoft\\MSCRM").GetValue("ServerUrl"))
).Replace("MSCRMServices", "");

Resources