mtkachenk0 / paradocs Goto Github PK
View Code? Open in Web Editor NEWRuby validation and documentation generation. Write validation code and get generated documentation that you don't have to maintain!
License: Other
Ruby validation and documentation generation. Write validation code and get generated documentation that you don't have to maintain!
License: Other
It can be used for faster enrollment. a method which takes an object and outputs somewhere (STDOUT) a Paradocs::Schema declaration syntax that matches the given schema
Extract schema metadata into a swagger compatible format
Example:
schema do
field(:name).type(:string).description("John")
field(:age).type(:number).description("This field represents your age")
end
Idle policy is a policy that doesn't raise any error and passes validation anyways, but executes a block if the validation logic actually failed.
Any policy should be able to be run as idle_policy
It can be used for payload generation.
schema do
field(:name).type(:string).example("John")
field(:age).type(:number).example(23)
field(:gender).type(:string).options(:m, :f) # example can be random from the options unless defined
field(:subscribe).type(:boolean).default(:true) # example can be default unless defined
end
For API that have logic changes inside but the structures cannot be modified (backward compatibility) would be usefull to implement method as
for field
schema do
field(:from_id).present.as(:from_identifier)
end
the result should not contain from_id
but contain from_identifier
with the very value of from_id
# Input:
{from_id: 1}
# Output:
{from_identifier: 1}
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.