refactor(schemas): make internal endpoint-schema surface unambiguous before 1.0 - #294
Merged
Conversation
The schemas subpackage is internal (its docstring and #288 establish the JSON Schema as an internal conformance artifact), but its explicit __all__ made the loader symbols read as a supported public API. Remove __all__ (Option B) so nothing signals a public export path we would be reluctant to break at 1.0. Keeps the module name to avoid churning importlib.resources package-data paths. Top-level azure_functions_validation.__init__ does not re-export these symbols; test_public_api stays green. No runtime or payload change. Closes #291
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Removes the explicit
__all__fromazure_functions_validation/schemas/__init__.py(Option B from #291). The subpackage is documented as internal, but declaring__all__made its loader symbols (ENDPOINT_METADATA_VERSION,load_endpoint_schema,endpoint_schema_sha256,assert_defs_present_if_ref_used, ...) read as a supported public API — an import path we would be reluctant to break at 1.0.Why Option B (not the rename)
Keeping the
schemasmodule name avoids churning theimportlib.resourcespackage-data paths that resolve the shippedendpoint.schema.json/.sha256. Removing__all__is sufficient to stop the surface reading as public.Verification
azure_functions_validation/__init__.pydoes not re-export any of these symbols (confirmed);test_public_api.pystays green.make check-allpasses; coverage stays >= 95%.ENDPOINT_METADATA_VERSIONunchanged.Closes #291
Supersedes #293 (re-created under a
chore/branch to satisfy the branch-naming gate; content unchanged).