Skip to content

Commit

Permalink
fix: change null to None for Python (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepankarm authored Mar 9, 2022
1 parent a5fb436 commit 447044d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ServerlessAutoSwagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ class ServerlessAutoSwagger {
if (this.serverless.service.provider.runtime.includes('python')) {
const swaggerStr = JSON.stringify(this.swagger, null, 2)
.replace(/true/g, 'True')
.replace(/false/g, 'False');
.replace(/false/g, 'False')
.replace(/null/g, 'None');
let swaggerPythonString = `# this file was generated by serverless-auto-swagger`;
swaggerPythonString += `\ndocs = ${swaggerStr}`;
await writeFile('./swagger/swagger.py', swaggerPythonString);
Expand Down

0 comments on commit 447044d

Please sign in to comment.