Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
What are the options for documenting a ServiceStack bases web services and I'm not talking about a one line string.
I would like to be able to document, in detail (which can be long), return types, possible HTTP responses, add detailed examples etc.
Is there any support for this in ServiceStack (I couldn't find it)?
If not has anybody solved the problem in some other way.
You can provide metadata descriptions for each of your web services by attributing your Request DTOs with [Api] and [ApiMember] attributes.
This information will be displayed on the dynamic metadata pages.
Another option is to simply create your own dynamic html page, which ServiceStack allows you to do by simply returning a string (containing your html markup). If you go this route you can access the Service Types metadata with the global EndpointHost.ServiceOperations property.
Also if dynamically generating html with C# is not your preference you can also generate html using the built-in Razor Markdown format which makes generating html quite pleasant :)
I realize this question is a couple years old, but there is now Swagger support for ServiceStack API's # https://github.com/ServiceStack/ServiceStack/wiki/Swagger-API
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
Im new to web development and trying to learn APIs through Django Rest Framework. I am actually confused about why we actually need to build an API. For example, I've seen tutorials of creating blog APIs, where it returns the posts and its info. Why would we need an API for that? We can simply create regular Django views to do the same. I've heard that APIs only provide the 'data', but I can also obtain data from regular Django. So why would you install a totally new 'sub' framework to do these for you?
Suppose you want to build a mobile application that serves some blog posts. have you thought about how you are going to fetch the blog posts from a back-end.
Take the case of instagram, the app fetches images,comments and tags from the django backend in the form of json data and can display relevant data on the application. in short, APIs can be used when the backend and frontend technologies are different and they can communicate through APIs
The biggest reason to use Django REST Framework is because it makes serialization so easy!
see this medium post
https://medium.com/#BennettGarner/build-your-first-rest-api-with-django-rest-framework-e394e39a482c
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have written a service using C++ and Qt framework (QtService). The service should run in the background. I need the service to have a web user interface and can be accessed using web browsers. I mean the service should act as as a web server and output html content to a specific port. I know there are some frameworks that can be used to generate web content in C++, but by taking into account that I am using Qt, I prefer to use Qt features as much as possible rather than a new framework. Any ideas?
I have read about Cutelyst on the Qt blog a few times, which seems an exact fit to your question.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I need to build a backend for a web application, i'm using AngularJS in the client-side, but i'm lost in what to use to accomplish the backend stuff as well as the web service.
I've read about Breezejs but it requires .Net, i know php btw (yii), and i need this backend to accept and return JSON. It will be used to store users info and do crud operations.
This is a subjective question, not very suitable for StackOverflow...
...but I must recommend Laravel 4, since you are used to PHP.
If the INPUT is JSON, the framework delivers it to you easily:
$value = Input::get('key');
If you are returning a model, its toArray method is applied automatically:
return $this->user->configuration;
The code snippet above is actually a real single-liner controller method I have in my app. The user is already logged in... there is a "configuration" table (one-to-one relationship)... With the above line, Eloquent (Laravel ORM) will make the proper query, fetch the result, and return the record... and it will be transformed into JSON for delivery...
I am used to several PHP frameworks, from Code Igniter to Symfony 2 - and I've never been happier than now with Laravel 4.
Yii is a normal solution since you already know some PHP, so this is the easy way.
Another way is if you want some exotic, I'll recommend CompoundJS framework for node.js, its good for REST API.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I know and I have worked on tagging in blog posts..etc I just saw a paper which says how to automate tagging in web services. But what do you exactly mean by tagging in case of web services?
A tag is a non-hierarchical keyword or term assigned to a piece
of information.
This kind of metadata gives a brief description of web services
and makes users find proper services more easily, categorize
web services and make web services management more
effective.
Tags allow cross-browsing between documents.
Tags can be used as keywords for search engines and this is
helpful to improve the performance of search engines.
Tags can also be used as a feature in query expansion systems
and recommendation systems.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm developing an application that communicates with an internal web service using HTTP.
Are there any "best practices" for custom user-agent strings so that I can put a nice one in my app? It's a Python library and the lower transport is Python's own httplib. Should the user-agent string say that or something else?
For internal use you can use anything really.
Of course, internal or external its always a good idea to include contact information, either web or email address, in case something breaks or application goes out of control.
Check this big list of user agents for inspiration: http://www.user-agents.org/
It is considered good practice to include at least an email address so people can contact you if your application is causing problems. This will also be your best chance of not getting blocked.
It's common to put a name and version number as well. Other than that it's mostly freestyle. user-agents.org has alot of examples.
Don't forget to honor robots.txt as well.
You can write in user-agent what you want! But if you beware of your application HTTP queries to this server may be blocked, set user-agent to common browser (like Firefox on Gecko engine) then server admin don't know what application reads her page and in server logs don't see your application.