You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
Hi
I am using the following code in order to add api declaration without using annotations:
ResourceListing resourceListing = null;
resourceListing = Swagger.createResourceListing(SwaggerVersion.DEFAULT_VERSION);
resourceListing.setBasePath("http://localhost:8080/Spring/rest");
SwaggerFactory factory = Swagger.createSwaggerFactory();
ApiDeclaration apiDeclaration = factory.createApiDeclaration("http://localhost:8080/Spring/rest", "/bookmarks");
Api api = apiDeclaration.addApi("/bookmarks");//the request url that is being called
Operation operation = api.addOperation("getBookmarks",Operation.Method.GET);
operation.setSummary("bookmarks list");
operation.addProduces("application/atom+xml");
resourceListing.addApi( apiDeclaration, "/bookmarks" );
Swagger.writeSwagger(resourceListing, "src/main/webapp");
now, after performing Swagger.writeSwagger I do get api-docs.json and bookmarks.json files under "src/main/webapp" as, But- when I access in the Swagger-ui to the resource "http://localhost:8080/Spring/rest/api-docs" I can't get the bookmarks resource. so my question is how to integrate the jsons file I got from swaggerWriter into the api-docs resource that is generated by the swagger-core.
I will really appreciate your help here!!!
The text was updated successfully, but these errors were encountered:
Hi Ole, thank you for your response, I already got arranged. I simply created a new resource, parallel to /api-docs swagger's resource, providing the appropriate json file
Hi
I am using the following code in order to add api declaration without using annotations:
ResourceListing resourceListing = null;
now, after performing Swagger.writeSwagger I do get api-docs.json and bookmarks.json files under "src/main/webapp" as, But- when I access in the Swagger-ui to the resource "http://localhost:8080/Spring/rest/api-docs" I can't get the bookmarks resource. so my question is how to integrate the jsons file I got from swaggerWriter into the api-docs resource that is generated by the swagger-core.
I will really appreciate your help here!!!
The text was updated successfully, but these errors were encountered: