-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adding script to modify access control of generated openapi types #555
Conversation
📲 You can test the changes from this Pull Request in Gravatar UIKit Prototype Build by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Gravatar SwiftUI Prototype Build by scanning the QR code below to install the corresponding build.
|
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.
This should give the desired outcome so looks good to me 👍.
I was thinking about pre-processing the yaml to mark the models as public/internal and making the mustache files respect that. But I don't have any intentions to over engineer this. So 👍
Thank you @pinarol ! I've made the PR ready to review. @andrewdmontgomery - Anything to add? I think it would be good to merge this before we need to update the spec again. If it's good enough now, we can think of further improvements later on if/when they are needed. |
📲 You can test the changes from this Pull Request in Gravatar Prototype Build by scanning the QR code below to install the corresponding build.
|
I like that this is written in Swift. Yeah, this is a good start. Let's merge it. |
Closes #537
Description
This is a proposal to select the access control of generated openapi types independent of each other.
This is a swift script which will run before SwiftLint. It's a kind of brute-force approach, matching strings on the file to be replaced, but it's simple and works.
There's a big room for improvements, like:
Testing Steps
make generate