Skip to content

Commit

Permalink
chore: fixed path level server and description requirement in spec fi…
Browse files Browse the repository at this point in the history
…le (#247)

* chore: fixed path level server and description requirement in spec file

* chore: fixed eslint error
  • Loading branch information
tiwarishubham635 committed Apr 30, 2024
1 parent 31b1e31 commit fe3db94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/twilio-api/api-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ class TwilioApiBrowser {
const path = entry[1];
if (key === '/healthcheck') return;
// Naive assumption: The Twilio APIs only have a single server.
path.server = path.servers[0].url;
if (path.servers === undefined) path.server = spec.servers[0].url;
else path.server = path.servers[0].url;
delete path.servers;

path.operations = {};
if (path.description === undefined) path.description = '';
path.description = path.description.replace(/(\r\n|\n|\r)/gm, ' ');

// Move the operations into an operations object.
Expand Down

0 comments on commit fe3db94

Please sign in to comment.