0.4.2 • Published 9 months ago
@atproto/lexicon v0.4.2
@atproto/lexicon: schema validation library
TypeScript implementation of the Lexicon data and API schema description language, which is part of atproto.
Usage
import { Lexicons } from '@atproto/lexicon'
// create your lexicons collection
const lex = new Lexicons()
// add lexicon documents
lex.add({
lex: 1,
id: 'com.example.post',
defs: {
// ...
}
})
// validate
lex.assertValidRecord('com.example.record', {$type: 'com.example.record', ...})
lex.assertValidXrpcParams('com.example.query', {...})
lex.assertValidXrpcInput('com.example.procedure', {...})
lex.assertValidXrpcOutput('com.example.query', {...})
License
This project is dual-licensed under MIT and Apache 2.0 terms:
- MIT license (LICENSE-MIT.txt or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0, (LICENSE-APACHE.txt or http://www.apache.org/licenses/LICENSE-2.0)
Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
0.4.2
9 months ago
0.4.1-rc.0
11 months ago
0.4.1
11 months ago
0.4.0
1 year ago
0.3.3
1 year ago
0.3.3-next.0
1 year ago
0.3.2
1 year ago
0.3.1
2 years ago
0.3.0
2 years ago
0.2.3
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago
0.2.2
2 years ago
0.1.0
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.4
2 years ago
0.0.1
3 years ago