Conversation
Collaborator
|
Hi, thank you for the PR! The docs and tests are pretty long, can you trim them down to what is realistically needed? You can take a look at how the other importers are documented and tested for reference. (In particular, descriptions of the development process like " |
This branch has not been deployed
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.
Adds OData 4.x import from CSDL XML or JSON, using URLs or local files. Supports selecting individual EntitySets or importing all advertised EntitySets, with authentication through the existing configuration system.
Sample usage
datacontract import odata \ --service-root-url 'https://xmart-api-public-uat.who.int/refmart/' \ --entity-set ref_country \ --output datacontract.yamlSample generated datacontract
I would suggest to add "odata" as a separate server type in the ODCS so that it can be handled without custom properties. Meanwhile, I have used the server type "api".
Current limitations
This feature implements import only.
Complex types, collection-valued fields, entity or container inheritance, enum types, type definitions and
types outside the table produce errors when used by selected schemas.
Tests pass (
uv run pytest)Code formatted (
uv run ruff check --fix && uv run ruff format)Docs updated (if relevant)
CHANGELOG.md entry added