[experimental] internal API/ request for feedback #5680
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @macobo @ukutaht
I experimented a little with steps towards removing
/query-internal-test
endpoint in favor of something maybe more explicit (aliasing/naming subject to change of course). Some upcoming API tests will require patchingnow
, so extending the JSON schema for this felt a bit excessive.. and that what's made me try if we have ways around it.Disclaimer: I don't feel super strongly about this. This is also unfinished work - I wanted to get feedback from you first, to see whether it makes sense to even continue like that. I can't decide if this way is particularly better or easier to maintain.
We can leverage process dictionary for global overrides such as "now", which might be a good idea since "now" references may be difficult to pass around, but idk, an explicit map with overrides should be fine as well - as demonstrated with conn.private holding parameters that are normally hidden from the public interface.
I found two places where production code calls
:internal
schema type to build a query that regular users are not permitted to - I've switched those to:public
- proving that the whole concept of public and internal JSON schemas can be removed altogether.Happy to carry on or close, let me know your thoughts please.