0

I am using swagger to create API documentation for one of my Spring Rest API project, but the swagger.json file created is having an issue. One of my Super class is not getting converted properly.

Library used to implement the swagger is springfox. Please find the implementation details below.

Configuration EnableWebMvc EnableSwagger2 ComponentScan

public class MvcConfig extends WebMvcConfigurerAdapter {
}

This is the class causing the problem

public class ListResultModel MODEL extends BaseModel {

}

Json Created

"schema":{"$ref":"#/definitions/RedirectAttributes"}}],"responses":{"200":{"description":"OK","schema":{"type":"string"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/admin/migration/vat":{"get":{"tags":["migration-controller"],"summary":"vatMigration","operationId":"vatMigrationUsingGET","consumes":["application/json"],"produces":["/"],"parameters":[{"name":"retailerId","in":"query","description":"retailerId","required":true,"type":"string"}
{"$ref":"#/definitions/**ListResultModel«Item»"**}},"401":{"description":""},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/api/items/withoutPictures/{departmentId}/{vendorId}/{status}":{"200":{"description":"OK","schema":{"$ref":"#/definitions/**ListResultModel«Item»"}**},"401":{"description":""},"403":{"description":"Forbidden"},"404":{"description":"Not }
{"$ref":"#/definitions/ListResultModel«Lead»"}},"201":{"description":"Created"},"401":{"description":""},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}

I am trying to resolve this for a long time and there is no clue how to do it. Can anybody help me please!

Thanks in advance. Vivek

Kishore Bandi
  • 5,537
  • 2
  • 31
  • 52
Vivek
  • 1
  • 2
  • what is the error that you're facing? Can you elaborate the issue? – Kishore Bandi Apr 25 '16 at 16:36
  • Hi Bandi Kishore, Thanks for the Help. ListResultModel«Item» is not a valid json notation, this should converted in to json format. I am using the generated json to import the API in to Amazone(https://aws.amazon.com/about-aws/whats-new/2015/07/introducing-swagger-importer-easily-import-swagger-api-definitions-into-amazon-api-gateway/) and which is failing because of the below symbol in the json « Regards Vivek – Vivek Apr 25 '16 at 17:32

1 Answers1

0

This Got Fixed by the below Thread.

https://github.com/springfox/springfox/issues/1283

Regards Vivek

Vivek
  • 1
  • 2