Is there any quick way to automatically generate HAR for ServiceStack Services to be used for API Documentation tools like API Embed?
Why don't you use existing tools?
With Swagger API your API will be automatically documented and testable.
If you prefer, you can use ServiceStack Metadata page too. It's less sexy than Swagger, but it's ok, it does the job.
Related
For getting BurpSuite report, I have trying to integrate my application with BurpSuite Scanner by using REST API. Can anyone help me this.
At present, Burp does not have a built-in REST API. Some users have good results with a third-party extension, burp-rest-api. This includes an endpoint (/burp/scanner/issues/) that lets you fetch issues in JSON format. You can also use /burp/report to generate an HTML or XML report that includes the issues.
A built-in REST API is being developed at present.
I have created an API using Swagger.
My customers will be able to make calls to my service like
https://theservice.com/data/items/category1/12345
This is fine and works ok.
However, I would like to have a page where they can see all available API calls, similar to how Swagger generates it on their SwaggerEditor app. For example by visiting https://theservice.com/index.html I would like them to see the API docs.
Is it possible (within Swagger) to do this on a live system (not just locally with swagger project edit which I already know)?
If yes, how?
It sounds like you're using the Swagger Editor to describe your API, then generating some scaffolding code using the built-in generator. From your tags, I assume this is node.js code. You'll need to add your own logic to the generated code to complete this API implementation (if you haven't already done so).
If this is correct, then the interactive Swagger-UI documentation you're looking for should be available in your generated API at /docs endpoint, relative to the base URL of your running service.
The generated node.js project includes the Swagger spec you created in the editor, and uses Swagger-Tools to do the runtime magic. Among other things, Swagger-Tools auto-wires your Swagger spec to the /docs endpoint, and manages routing of requests to the generated controllers, based on information provided in your Swagger spec.
Note that the /docs page will look and behave somewhat differently from the documentation widget you see in the Swagger editor. The one in your application uses Swagger-UI, which is the runtime component for documentation, with interactive sandbox testing. Swagger-Editor has its own built-in documentation UI, and this is not currently packaged for use outside of the Swagger-Editor.
If you've already implemented an API, independent of the Swagger editor and code generator, you can still generate node.js code to see how to incorporate Swagger-Tools into your existing API implementation. Or, as wing328 suggests, take a look at Swagger-UI to see how you can add your own documentation page.
I think what you're looking for is swagger-ui and here is an example: http://petstore.swagger.io/
As you can see, it not only lists out all the available API endpoints but also lets visitors (developers) to try it out directly in the web page.
Swagger specification document is not being generated from Swagger integration into Node.js project as a sub project. However, SwaggerUI is up and running. If we provide say swagger.json or api-docs.json file then it is rendering specified REST API calls.
My requirement is to generate the API document for existing project. How do I do it ?
See this answer for help in deciding how to generate Swagger docs for a project.
You can either manually create the docs for your API and have Swagger UI serve them, or you can use a node package like swagger-node-express which will do most of the documenting automatically. See the link above for pros and cons of each of these options.
Which tools can I use to document ServiceStack web services?
Is there anything available in servicestack that can help?
I am currently using RestServiceBase version of ServiceStack.
If you need something more the /metadata pages look at the Swagger API support in ServiceStack.
It should have no effect for this, but I'd recommend moving to the New API as RestServiceBase is part of the Old API that's been deprecated for some time.
I was wondering whether or not BreezeJS is compatible when using other technologies other than Web API and/or Entity Framework? As I'm currently in development of a SPA using Service Stack to retrieve data and ORMLite?
So I am curious how BreezeJS handle's this as I know it uses it's own API Controller usually with an extension of the DbContext class which Entity Framework uses. Thanks.
There is currently a sample called NoDb in the samples zip available on the breeze website. This sample does not use EF, but it does use WebApi. So I'd start by looking there. ( additional documentation on this sample should be added within a day or two as well).
In terms of using ServiceStack instead of WebApi, breeze supports the concept of a "dataServiceAdapter" and currently ships with two, an OData adapter and a WebApi adapter. It is certainly possible to write a ServiceStack adapter that breeze could use but this is not trivial. Please add this as a feature request ( and vote for it) on the breeze User Voice. We take these requests seriously.