Does anyone know where ServiceStack is referencing TagAttribute from. According to ServiceStack's OpenAPI documentation a route can be marked as [Tag("Core Requests")] to categorize the routes but I cannot locate where TagAttribute is actually defined. I am using ServiceStack v4.5.8.
http://docs.servicestack.net/openapi
The [Tag] attribute was added in the latest v4.5.10 release so you'll need to upgrade to v4.5.10+ to use it.
Related
I'm new to node, swagger etc.
I'm working on a node.js app, I added some endpoints and using express-validation package I configured validators for my end points.
I now started using also swagger-autogen to generate swagger doc, but I can't find a way to make swagger use the validators in order to provide more data/limitations of the endpoints' parameters.
Is there a way to achieve something like that?
Thanks
I am writing a NestJS service that provides a REST API and it publishes some messages to NATS. We are using the NestJS support to generate OpenAPI docs, and from the OpenAPI docs we generate an SDK that we import into our clients. This all works great, but only the REST API of our code is in the SDK.
What we'd like to also do is to have NestJS include the DTO's for the content for the messages we publish to NATS. Then our SDK will also include interfaces for these DTO's, and then our clients can cast the message content to the correct interface (based on the message subject). This way, the publisher of an event defines the content of the event, and users of it don't have to replicate the interface, yet they get strongly-typed code.
I've tried adding the #Api decorators to the DTO, but it appears that unless the DTO is used in the definition of an #Controller, it is not included in the resultant openApi docs.
I was hoping for a way to decorate a "random" DTO in my code so it will then be included in the swagger docs, and in-turn included in a generated SDK. Is something like that possible?
you can also pass extraModels array as a part of SwaggerDocumentOptions
SwaggerModule.createDocument(app, config, {
extraModels: [.......]
});
https://github.com/nestjs/swagger/issues/241
I need to generate dtos with swiftref but my API doesn´t has the path /types/swift like to http://techstacks.io/types/swift. I added the swift server configuration http://docs.servicestack.net/swift-add-servicestack-reference#swift-server-configuration in my AppHost but the path not work, Any idea?
Every ServiceStack AppHost supports exposing the Add ServiceStack Reference routes by default which is available from {baseUrl}/types/swift. You don't need to add any Swift Server configuration as it's enabled by default.
Make sure you're using the right baseUrl, which is also where the /metadata page is located. If you're using the right baseUrl check your ?debug=requestinfo for any Startup Errors, you will need to have DebugMode=true enabled.
I'm playing around with ServiceStack's AutoQuery, but getting stuck with this. I've put Plugins.Add(new AutoQueryFeature { MaxLimit = 100}); up, and tried to add all the namespaces, but no luck so far. Thanks.
UPDATE: I'm following the main, ServiceInterface, ServiceModel structure. When I put public IAutoQuery AutoQuery { get; set; } into main, it could be recognized. But not working in ServiceInterface. How to solve this?
All the AutoQuery functionality is contained in the single AutoQueryFeature.cs which is in the ServiceStack namespace.
This is also where you'll find the IAutoQuery interface (also in the ServiceStack namespace). This means if you can find AutoQueryFeature you'll also be able to find IAutoQuery by default, if you're having build errors, it's likely there's some other issue, i.e. try a clean build otherwise you maybe you need to restart Visual Studio.
The AutoQuery feature is in the ServiceStack.Server NuGet package:
PM> Install-Package ServiceStack.Server
I'm using the ServiceStack Stripe package, but it seems the serializer for the GetStripeCustomer method doesn't parse the Subscription Status correctly.
In the JSON I can see that the Status is "past_due", but when ServiceStack converts it to StripeCollection the Status value is "Unknown".
I'm using ServiceStack.Stripe v4.0.24
Has anyone encountered this?
There was an issue automatically converting Stripe's Lower_Case_Enums into ServiceStack's .NET enums PascalCase naming convention which should be resolved with this commit.
This change is available from v4.0.37+ that's now available on MyGet.