-
Notifications
You must be signed in to change notification settings - Fork 14
Convert Fabric APIs to TypeSpec #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for signalwire-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
yarn run v1.22.22 OpenAPI Specification AnalysisChanges are compared to the
Done in 152.43s. |
Should fix some of the errors in the OpenAPI report while im already here and working on this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very sorry for all the comments, please feel free to ask for clarification on anything! I know I made a few as notes and I will come back to those shortly.
I think this is looking great overall! I think there are some copy paste issues, and a few endpoints with the wrong bodies.
These also don't feel clearly represented to me, but I might have missed it:
specs/signalwire-rest/fabric-api/_shared/fabric-address/models/core.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/subscribers/subscriber-tokens/models/core.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/subscribers/subscriber-tokens/models/core.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/swml-scripts/addresses/main.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/swml-webhook/addresses/main.tsp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really great!
Few concerns:
specs/signalwire-rest/fabric-api/freeswitch-connectors/addresses/main.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/subscribers/refresh-tokens/models/requests.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/subscribers/refresh-tokens/models/responses.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/subscribers/refresh-tokens/models/responses.tsp
Outdated
Show resolved
Hide resolved
…odels/core.tsp Co-authored-by: Cassie <[email protected]>
- Introduced Ciphers enum with various AES cipher options. - Added Codecs enum for audio and video codecs including PCMU, PCMA, G722, G729, OPUS, VP8, and H264. - Created Encryption enum to define encryption requirements: Required, Optional, and Default.
…/docs into Devon/fabric-typespec
…/docs into Devon/fabric-typespec
…/docs into Devon/fabric-typespec
* Add status callback fields to CXML and SWML Scripts endpoints * Update core.tsp * Update specs/signalwire-rest/fabric-api/cxml-scripts/models/requests.tsp * Update specs/signalwire-rest/fabric-api/cxml-scripts/models/requests.tsp * Update specs/signalwire-rest/fabric-api/swml-scripts/models/requests.tsp * Update specs/signalwire-rest/fabric-api/swml-scripts/models/requests.tsp --------- Co-authored-by: Devon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks great, really nice work with this!! I'm a big fan of how you organized the documentation as well, it's a very clean look.
I have a few nits but 99.9% of them are missing new lines, so hopefully that's easy to update across all of them at once! 😅
The missing new lines can cause problems in prime, but if it doesn't for Docusaurus, let me know and I'm happy to approve without those changes.
My one thought is that it could be helpful if we put SWML Scripts and SWML Webhooks together here, like you did with all the CXML resource types. However, I wouldn't block on this!

specs/signalwire-rest/fabric-api/call-flows/models/responses.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/swml-scripts/addresses/models/core.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/swml-scripts/addresses/models/responses.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/swml-scripts/models/responses.tsp
Outdated
Show resolved
Hide resolved
specs/signalwire-rest/fabric-api/swml-scripts/models/requests.tsp
Outdated
Show resolved
Hide resolved
…ests.tsp Co-authored-by: Cassie <[email protected]>
….tsp Co-authored-by: Cassie <[email protected]>
….tsp Co-authored-by: Cassie <[email protected]>
…ests.tsp Co-authored-by: Cassie <[email protected]>
…ests.tsp Co-authored-by: Cassie <[email protected]>
…onses.tsp Co-authored-by: Cassie <[email protected]>
…onses.tsp Co-authored-by: Cassie <[email protected]>
It seems TypeSpec actually doesnt care for newlines. I was curious to see if their formatter would fix this for us automatically: https://typespec.io/docs/handbook/formatter/ Testing this in the SWML schema repo, i found it actively removes them when present: ![]() I think we are good to ignore newlines in this case, however, if we wanted to add a code style rule to include newlines so we are consistent with your rules, we can add a custom linter: https://typespec.io/docs/extending-typespec/linters/ |
Sounds good to me! I will resolve all the new line comments |
REST API Update Pull Request
Description
Convert all Fabric APIs to TypeSpec
Type of Change
Motivation and Context
We want to live in a world of only TypeSpec
Checklist:
team/developer-experience
label in the PR.