Lots of changes to make API doc compatible with swagger-ui