Skip to content

Commit

Permalink
fix(openapi): create migration to add POST response 201
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Oct 14, 2024
1 parent 93f5556 commit 780dd78
Show file tree
Hide file tree
Showing 2 changed files with 271 additions and 0 deletions.
13 changes: 13 additions & 0 deletions openapi/migrations/2024-10-14-add-post-response-201.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import spec from '../spec.json';
import { traverse, writeSpec } from '../../utils';

/**
* @see {@link https://github.com/braze-community/braze-php/issues/115}
*/
traverse(spec, '', null, (value, key, parent) => {
if (value?.post && !value.post.responses[201]) {
value.post.responses[201] = value.post.responses[200];
}
});

writeSpec(spec);
Loading

0 comments on commit 780dd78

Please sign in to comment.