Submitting SMAPI application with manifest support - sonos

Where do I provide the manifest url when submitting a new SMAPI integration? The field for providing a manifest url is non existent.

If you have a manifest file URL, enter it in the String Resource XML File field. See the Application review and validation section of Submit your service for details.

Related

DownLoad VichBundle file Api Platform

I'm using API platform with VichBundle to store file on the back side and React Native on the Front side.
I've followed the documentation of API platform and the upload part is working well, but I don't know how to download the document.
When I make a GET request I have the entity with the url of the file but I can't do a GET request with this url because there is no route to this file.
Can somebody give me an exemple of how to download file with api platform and Vichbundle.
Thanks
If you are following Api Platfom's documentation your files should be uploaded to your project's ./app/public/media/ folder and available making an HTTP GET request to http(s)://<yourdomain>/public/media/<filename>.<extension>. Just open the URL in your browser.
To get the exact url query yout API for me mediaObject information (for example, /api/media_objects/{id}) and check the contentUrl property.

When trying to open Swagger-UI getting only a json Response

I am getting the following response when requesting for Swagger doc in a Web API project,even the same response getting from Azure.
Can any one help me to get the Swagger UI.
Perhaps try to request the Swagger-UI through a different url, eg.../swagger/index.html.
I am not working with .NET here and I have no Idea about your setup, but did you (for example) copied swagger-ui resources to your webdir?
It looks like you are calling swagger interface directly and not swagger-ui (which is something different).
https://swagger.io/swagger-ui/
from Swagger-Ui Documentation:
Step 1: Go to the GitHub repository of the Swagger UI project
Step 2: Clone or download the zip file of the repository
https://github.com/swagger-api/swagger-ui
Usage
Step 1: Go to the folder containing the Swagger UI project in your local machine
Step 2: Open the dist folder
Step 3: Run the dist/index.html file on a browser or place the dist folder inside your server.
Step 4: The Swagger UI will now be live in the browser, with the default rendering of the Swagger Petstore. The JSON specification of the Swagger Petstore can be found here - http://petstore.swagger.io/v2/swagger.json
Note: Please remember that to load a specification and execute the UI’s try out requests, you would need to have enabled CORS (read below)
Step 5: You can mention the YAML or JSON path of any existing specification hosted on a server in the field on the top navigation bar.
The correct URL for the UI would be https://localhost:44390/swagger/ui/index
Check if swagger is configured to use any custom route or prefix. In this case the UI URL would be url:port/route-prefix/index.html. Route prefix empty = url:port/index.html.

Is it possible to share RAML file via APIKIT Console?

We want not just to share the API console that is provided via apikit component in a Mule application, but also the raw RAML file so consumers can create their own clients based on the RAML. As far as I know, there is not user friendly way to download the published raw RAML file from within the APIKit console. I just found that one can point to the /api url and do a GET with "application/raml+yaml" content-type, but it is not user friendly enough. Any clues? Thanks
You can use the URL to your console with ?raml on the end of the url.
http://myapp.cloudhub.io/api/v1/console?raml
In at least Mule 4.3.0 (maybe earlier), you can append ?api to the console URL, e.g.
http://localhost:88/myproject/console/?api

Sense/Net download text file

When I try to download the text file in sensenet, the text file will open in browser but not downloaded, could you give some suggestions about how to set to download text file directly?
It's handled by the browser. If it can open a certain file type, then it will show it instead of downloading.
On server side you can force to download file types on your website if your http handler use disposition when set response stream:
response.AppendHeader("Content-Disposition", "attachment");
With sensenet you have to write your own http handler or modify ProcessRequest of SenseNetStaticFileHandler.cs.
MSDN is not too helpful on this topic, but you can find some information on this here.
On client side there is another solution, if you can change the html code of the link. With html5 <a> tag has got a download attribute that forces the linked file to download instead of navigate the browser to it. It works if the browser supports it. See HTML download Attribute.

AmazonS3: custom error pages

I am planning to share URLs (time limited) for private objects. Is there a way to set custom error pages for 404/403 http responses ?
Yes, it's possible, see this announcement.
In the Developer guide there is a paragraph about "Custom Error Document Support" where I read the following sentence.
You can optionally provide a custom
error document with a user-friendly
error message and with additional
help. You provide this custom error
document as part of adding website
configuration to your bucket. Amazon
S3 returns your custom error document
for only the HTTP 4XX class of error
codes.
How to set 4xx custom error page:
With CloudBerry, you can right click on a bucket, select Properties, click the tab Website and set the index document and the 4xx error document.
Use AWS Java SDK, here is an example code (not tested)
AmazonS3 client = new AmazonS3Client(new BasicAWSCredentials(
"accessKey", "secretKey");
BucketWebsiteConfiguration conf = new BucketWebsiteConfiguration(
"index.html", "404.html");
client.setBucketWebsiteConfiguration("bucketname.example.com", conf);
UPDATE I also found this blog post: Host Your Static Website on Amazon S3.