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/
I saw a thread that claims the Extjs 6 exporter plugin is broken.
What's the deal with this plugin? Please let me know your thoughts on the plugin because I want to use this plugin for exporting grid data to Excel.
AFAIK, the export functionality in EXTJS 6 was not working. This is because if you use the responseHeader component to fetch the data to load into an XML, it would fail. The responseHeader was being returned as undefined.
This is fixed in 6.0.1.
I hope this is what you are looking for.
I'm setting up some tests with JMeter, and I've seen that it's throwing out an error where trying to download embedded resources inside a web page, that have a path like the following:
www.mydomain.com/resources?getItem={someID}
The problem is that the characters need to be URL-encoded, so the following URL should follow this pattern:
www.mydomain.com/resources?getItem=%7BsomeID%7D
Now, how could instruct JMeter to replace these characters, when found on URLs from embedded resources in the web page? I've been looking at BeanShell PreProcessors, but I'm not sure how's the best way to handle this scenario.
Thanks!
You are facing this bug:
https://bz.apache.org/bugzilla/show_bug.cgi?id=58137
Until bug is fixed, your option is to disable embedded download and use :
CSS/ JQuery Post Processor to extract URLs
Use ForEach Controller to iterate over urls
This will only simulate serial download not parallel one.
Update 15th july 2015:
Bug has been fixed yesterday night, you can give nightly build a try:
http://jmeter.apache.org/nightly.html
Read:
Installing JMeter runtime
Download the _bin and _lib files
Unpack the archives into the same directory structure
The other archives are not needed to run JMeter.
What about this built in Jmeter function?
http://jmeter.apache.org/usermanual/functions.html#__urlencode
For some REST APIs written in PHP, I was asked to create Swagger documentation, and since I was not aware of any easy way of annotating those existing APIs and create such a documentation, I used this editor to generate some for now.
I saved the JSON and YAML files created using that editor, and now I need to create the "interactive" Swagger documentation from there.
Can someone please let me know how I can convert the Swagger JSON specification file to an actual Swagger documentation?
I am on the Windows platform and do not know anything about Ant/Maven.
Try to use redoc-cli.
I was using bootprint-openapi by which I was generating a bunch of files (bundle.js, bundle.js.map, index.html, main.css and main.css.map) and then you can convert it into a single .html file using html-inline to generate a simple index.html file.
Then I found redoc-cli very easy to to use and output is really-2 awesome, a single and beautiful index.html file.
Installation:
npm install -g redoc-cli
Usage:
redoc-cli bundle -o index.html swagger.json
I was not satisfied with swagger-codegen when I was looking for a tool to do this, so I wrote my own. Have a look at bootprint-swagger
The main goal compared to swagger-codegen is to provide an easy setup (though you'll need nodejs).
And it should be easy to adapt styling and templates to your own needs, which is a core functionality of the bootprint-project
Everything was too difficult or badly documented so I solved this with a simple script swagger-yaml-to-html.py, which works like this
python swagger-yaml-to-html.py < /path/to/api.yaml > doc.html
This is for YAML but modifying it to work with JSON is also trivial.
I spent a lot of time and tried a lot of different solutions - in the end I did it this way :
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist#3.17.0/swagger-ui.css">
<script src="//unpkg.com/swagger-ui-dist#3/swagger-ui-bundle.js"></script>
<script>
function render() {
var ui = SwaggerUIBundle({
url: `path/to/my/swagger.yaml`,
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
]
});
}
</script>
</head>
<body onload="render()">
<div id="swagger-ui"></div>
</body>
</html>
You just need to have path/to/my/swagger.yaml served from the same location.
(or use CORS headers)
Check out pretty-swag
It has
Similar looking as Swagger-Editor's right panel
Search / Filter
Schema Folding
Live Feedback
Output as a single html file
I was looking at Swagger Editor and thought it could export the preview pane but turned out it cannot. So I wrote my own version of it.
Full Disclosure: I am the author of the tool.
See the swagger-api/swagger-codegen project on GitHub ; the project README shows how to use it to generate static HTML. See Generating static html api documentation.
If you want to view the swagger.json you can install the Swagger UI and run it. You just deploy it on a web server (the dist folder after you clone the repo from GitHub) and view the Swagger UI in your browser. It's a JavaScript app.
You can also download swagger ui from: https://github.com/swagger-api/swagger-ui,
take the dist folder, modify index.html:
change the constructor
const ui = SwaggerUIBundle({
url: ...,
into
const ui = SwaggerUIBundle({
spec: YOUR_JSON,
now the dist folder contains all what you need and can be distributed as is
For Swagger API 3.0, generating Html2 client code from online Swagger Editor works great for me!
Give a look at this link : http://zircote.com/swagger-php/installation.html
Download phar file https://github.com/zircote/swagger-php/blob/master/swagger.phar
Install Composer https://getcomposer.org/download/
Make composer.json
Clone swagger-php/library
Clone swagger-ui/library
Make Resource and Model php classes for the API
Execute the PHP file to generate the json
Give path of json in api-doc.json
Give path of api-doc.json in index.php inside swagger-ui dist folder
If you need another help please feel free to ask.
There's a small Java program which generates docs (adoc or md) from a yaml file.
Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder()
.withMarkupLanguage(MarkupLanguage.ASCIIDOC)
.withSwaggerMarkupLanguage(MarkupLanguage.ASCIIDOC)
.withOutputLanguage(Language.DE)
.build();
Swagger2MarkupConverter builder = Swagger2MarkupConverter.from(yamlFileAsString).withConfig(config).build();
return builder.toFileWithoutExtension(outFile);
Unfortunately it only supports OpenAPI 2.0 but not OpenAPI 3.0.
If you commit your JSON file in Gitlab, it will render it for you.
Redocly's CLI interface has a tool to build HTML docs from OpenAPI spec files.
sudo npm i -g #redocly/cli
redocly build-docs my-swagger.yml -o docs.html
The Docs show this
/repository/downloadAll/BUILD_TYPE_ID/BUILD_SPECIFICATION
for getting all of your artifacts as a zip file, but that isn't using the REST API. Is there a way in the REST API do do the same thing? The Docs seem to indicate that the repository links are only there for backwards compatibility.
You can use this URL, it works for me:
http://<TeamcityUrl>/httpAuth/app/rest/builds/id:<BuildId>/artifacts/archived
I use TeamCity 9.
From the documentation: http://confluence.jetbrains.net/display/TW/REST+API+Plugin#RESTAPIPlugin-buildartifacts
Artifacts:
GET <TeamcityUrl>/httpAuth/app/rest/builds/<buildLocator>/artifacts/files/<artifact relative name>
If you download the artifacts from within a TeamCity build, consider using teamcity.auth.userId/teamcity.auth.password system properties as credentials for the download artifacts request: this way TeamCity will have a way to record that one build used artifacts of another and will display that on build's Dependencies tab.
have you tried this?
I'm not sure it's documented, but it works.
http://teamcity-url/downloadArtifacts.html?buildId=216886
If you are using it from .NET you may use the following code:
List<string> downloadedFiles = new RemoteTc()
.Connect(a => a.ToHost("tc").AsGuest())
.DownloadArtifacts(123, #"C:\DownloadedArtifacts");
The above code uses FluentTc library