MOReg Posted June 9, 2021 Share Posted June 9, 2021 Hi All, I'm trying to generate python3.8 code from the swagger file at "https://developer.sage.com/api/accounting/files/swagger.full.json". It appears to me that swagger 2 is used by swagger.full.json and pip install swagger_codegen installs swagger 3. I cant find a version of swagger_codegen that will work with swagger 2 I've tried to convert the swagger 2 file to swagger 3 I'm using python but maybe there is a better way? Is c# more reliable for example? Any help with this would be appreciated! Mark Link to comment Share on other sites More sharing options...
MOReg Posted June 9, 2021 Author Share Posted June 9, 2021 I switched from python generating the code to a java version found https://swagger.io/docs/open-source-tools/swagger-codegen/ and used command java -jar swagger-codegen-cli-2.2.1.jar generate -i <path of your Swagger specification> -l <language> I havent tried out the code yet but at least generated! Link to comment Share on other sites More sharing options...
Administrators Ben Smith Posted June 10, 2021 Administrators Share Posted June 10, 2021 Hi, Thanks for updating what worked for you - let us know please if you have further issues. I'm not sure about swagger_codegen for swagger 2 - but we can investigate further if it remains a problem! Ben Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now