Swagger doesn't work with HAPI FHIR model

I am trying to create a API documentation for FHIR endpoints using swagger but swagger is not working correctly with HAPI FHIR model.
Any help on this?
Is there any model/schema parser or serializer like FHIR object serializer IParser parser = ctx.newJsonParser() ?

Thanks in advance.