I want to browse a file from my system and want import it using apiray so how I can do that please help me into this.
you can try to use Apiary CLI (https://help.apiary.io/tools/apiary-cli/)
The Apiary CLI gem is a command line tool for developing and previewing API Blueprint documents locally. It can also be used for pushing updated documents to and fetching existing documents from Apiary.io.
Related
I'm trying to get hold of gitlab_schema.graphql, i.e. the schema for Gitlab's graphql API. Can't find it anywhere, does anyone have any pointers?
You can use apollo CLI for this: apollo client:download-schema --endpoint=https://gitlab.yourcompany.com/api/graphql schema.graphql or just omit filename and it will download to JSON
It doesn't look like GitLab shares the schema directly, just this Reference Documentation generated from the schema, and the GraphiQL Explorer / IDE (more info about GraphiQL Explorer here).
I found the schema is an artifact in the Gitlab CI pipe (graphql-schema-dump job), for example here: https://gitlab.com/gitlab-org/gitlab/-/jobs/1602029144.
Not perfect, but works.
Here's alternative, if you are working with Rust lang. For Rust developers, you need to install the crate named graphql_client_cli via cargo. Example: cargo install graphql_client_cli.
Next, you can run the graphql client you just downloaded, to get the schema (either in JSON or GraphQL format). Example: graphql-client --authorization 'Bearer <bearer token>' https://<your gitlab url site>/api/graphql.
See the GraphQL Client CLI for more options.
Sometimes you get over a feature that you just like. When creating a Azure Function project and debugs it, it writes out this nice info in the console.
Now that I am writing the frontend, I have found this information very useful.
Functions:
CoWorkers: [GET,POST] http://localhost:7071/api/CoWorkers
GetManager: [GET,POST] http://localhost:7071/api/GetManager
SetManager: [GET,POST] http://localhost:7071/api/SetManager
UserInfo: [GET,POST] http://localhost:7071/api/UserInfo
...
I would like to have this on every asp.net rest api project that I am coding.
Anyone knows how to get it?
EDIT: OpenApi/Swagger is providing this information as pawelek91 says and I should have mentioned that I want it in the console: "Just because I like that feature".
use HttpOption request or swagger (if you can install it on your backend)
For console access to your web API, try the new HttpRepl tool at:
https://learn.microsoft.com/en-us/aspnet/core/web-api/http-repl/
It's a dotnet CLI tool that is installed separately (install using dotnet tool install -g Microsoft.dotnet-httprepl from the CL). Then you can "browse" your API using this command line tool.
As noted in the docs, it requires .Net Core 2.1+.
For Single request,I can able to download the response output in excel format by chose an option 'Send and Download'. Can anyone help me to download the same using collection runner in postman.
This feature is not available in Postman Collection Runner yet! However, there is a workaround if you would like to do it in Newman.
As Newman is built on Node.js, you can extend it in a Node.js code as you can see in the below example.
https://github.com/postmanlabs/newman/issues/413#issuecomment-316116450
Running the script above essentially does the same thing as newman run ... and also saves the responses to files
I'm using a AWS Lambda function to merge PDF files stored on S3. In addition to that, I need now to create a PDF file (from HTML and CSS). I was trying to use wkhtmltopdf, but it seems that I would have to install it using apt-get install (which I don`t think I have access on AWS Lambda).
Any ideas on how can I do it?
Any suggestions for wkhtmltopdf replacements?
Thanks!
There are multiple projects on GitHub claiming to run wkhtmltopdf on Lambda. Here are a few.
https://github.com/lubos/aws-lambda-wkhtmltopdf
https://github.com/dimiro1/lambda-wkhtmltopdf
https://github.com/jpaolin/aws-lambda-s3-wkhtmltopdf
Include the wkhtmltopdf binary and making sure it has execution permission(chmod 755). Add the binary path to your language runtime. e.g. with nodejs
process.env['PATH'] = process.env['PATH'] + ':' + process.env['LAMBDA_TASK_ROOT'] + '/bin/linux';
There is a specific download of wkhtmltopdf for use with AWS Lambda.
It is meant to be used as a separately uploaded Layer.
Upload the binary inside a folder of your project for example in a folder "binary /" so that at the time of lambda execution you can call it by reference
Important caveat: If you want to use wkhtmltopdf successfully on AWS Lambda, you will need to use v0.12.4.
It turns out that newer versions have some issues with dynamic libraries. If you drill into it, you'll find some .so files missing.
Source: Richard Keller
Whenever you deploy to cloud code, Parse.com outputs the new release version.
"New release is named v296 (using Parse JavaScript SDK v1.4.2)"
Is there anyway to get this information programatically within cloud code?
I could not find a way to do that without a small trick:
I capture the console everytime I deploy a new version and then I parse the last line to get the version number. With that information, I update a collection in my Parse environment with this version code.
Whenever I need this information in cloud code (or even in the client), I query this collection to get it.
That's not the best way to do it, but it works...
Note: if, for some reason, you could not capture the console after deploy, you can also use "parse logs" and search for a string like "Deployed v296 with triggers:" and do the same after parsing it.
Hope this helps!