Skip to content

Commit

Permalink
Merge pull request #126 from braze-community/fix/openapi
Browse files Browse the repository at this point in the history
fix(openapi): create migration to add POST response 201
  • Loading branch information
remarkablemark authored Oct 14, 2024
2 parents 93f5556 + 780dd78 commit 26524d0
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 26524d0

Please sign in to comment.