pennsignals / aptos Goto Github PK
View Code? Open in Web Editor NEW:sunny: A tool for validating data using JSON Schema and converting JSON Schema documents into different data-interchange formats
License: Apache License 2.0
:sunny: A tool for validating data using JSON Schema and converting JSON Schema documents into different data-interchange formats
License: Apache License 2.0
aptos
currently supports Python versions 3.x. See PEP 373 for details.
When using the CLI with Python versions < 3.x, the following exception is raised:
It would be helpful if the __main__
module checked the Python version to raise a more informative error message.
Running tests fail with python 2.7.13
It would be great if aptos supported parsing and validating data using the latest JSON Schema specification.
Development of the JSON Schema draft-07 is currently in progress and the last day for feedback is November 20th, 2017. A summary of changes is defined in the latest proposal.
if
, then
, and else
writeOnly
and readOnly
json-pointer
I just downloaded and installed the tool, but when I am trying to validate against my schema it throws
omponent = SchemaParser.parse(schema)
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/site-packages/aptos/parser.py", line 16, in parse
component = Creator.create(schema.get('type')).unmarshal(schema)
File "/usr/lib/python2.7/site-packages/aptos/primitive.py", line 28, in create
}identifier.class
KeyError: <type 'unicode'>
I dont have any special character that requires unicode in the my data or schema. Is it possible to pass it as variable?
Currently, aptos
supports converting JSON Schema documents into the Apache Avro data-interchange format.
A proposed class in the visitor
module (e.g ParquetSchemaVisitor
) should yield the converted Parquet document.
I'd like to add support for parsing Swagger (OpenAPI) Specifications. Swagger uses JSON Schema and supports most primitive data types, so the primitive.Creator
class factory can be used to create and unmarshal schema instances.
Advantages of adding support for Swagger:
I envision the flowchart for this functionality to look like this:
Swagger specifications use responses
objects to define the expected responses returned from the HTTP API.
Here is an example of an expected response from the GET /pets
endpoint. aptos
could validate the HTTP response body using the visitor.ValidaitionVisitor
class.
I will create a new branch for this proposed prototype.
The example script in the Data Validation CLI section needs a little adaptation to work in windows prompt, otherwise double quotes won't be recognized and error will be reported as screenshot at bottom.
I may contribute an easy solution for windows to the README, but I don't know how to apply font color to output message in windows prompt.
Currently, the __main__.py
module is a bit messy. I'd like to create a Formatter for successful and unsuccessful operations.
I am open to using a module for term coloring instead of using the TermColors
enum, however, I'd like to keep the amount of dependencies to a minimal.
In a previous issue #11, @rightlag suggested using termcolor
instead of the current solution. I did a little search, found this Stackoverflow post, seems not hard. And I plan to implement it in the __main__.py
.
Currently, aptos
supports converting JSON Schema documents into the Apache Avro data-interchange format.
A proposed class in the visitor
module (e.g ProtobufSchemaVisitor
) should yield the converted Protocol Buffers document.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.