-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathopenapi.yml
More file actions
906 lines (901 loc) · 26.1 KB
/
Copy pathopenapi.yml
File metadata and controls
906 lines (901 loc) · 26.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
openapi: 3.0.0
info:
title: Codepoints.net Unicode API
description: |
Welcome to codepoint.net’s Unicode API. Most requests are JSON-based. The
`glyph` and `property` methods return PNG images. When problems appear, the
API response conforms to RFC 7807 <https://tools.ietf.org/html/rfc7807>.
Documentation is published at
<https://github.com/Codepoints/codepoints.net/wiki/API>.
version: 1.0.0
externalDocs:
description: API documentation on Github
url: https://github.com/Codepoints/codepoints.net/wiki/API
servers:
- url: https://codepoints.net/api/v1
description: live instance
- url: https://beta.codepoints.net/api/v1
description: testing instance
components:
schemas:
codepoint:
description: a hexadecimal, potentially 0-padded number
type: string
pattern: '^(10|[1-9A-Fa-f])?([0-9A-Fa-f]{4})$'
u_codepoint:
description: a hexadecimal, potentially 0-padded number with leading “U+”
type: string
pattern: '^U\+(10|[1-9A-Fa-f])?([0-9A-Fa-f]{4})$'
parameters:
codepoint:
name: codepoint
description: |
A hexadecimal code point between 0 and 10FFFF inclusively.
in: path
required: true
schema:
$ref: '#/components/schemas/codepoint'
examples:
firstCP:
value: '0000'
bmp:
value: 'A2D4'
emoji:
value: '1F456'
noncharacter:
value: 'EFFFD'
lastCP:
value: '10FFFF'
paths:
"/codepoint/{codepoint}":
parameters:
- $ref: '#/components/parameters/codepoint'
- name: property
description: a comma-separated allow-list of properties to include
in: query
schema:
type: array
items:
type: string
get:
operationId: codepoint
summary: show detailed information about a single code point
description: |
You can specify fields of interest with the “property” parameter:
codepoint/1234?property=age,uc,lc.
responses:
"200":
description: properties of the given code point
content:
application/json:
schema:
type: object
properties:
cp:
type: integer
age:
type: string
na:
type: string
na1:
type: string
gc:
type: string
ccc:
type: string
bc:
type: string
Bidi_M:
type: boolean
Bidi_C:
type: boolean
dt:
type: string
CE:
type: boolean
Comp_Ex:
type: boolean
NFC_QC:
type: string
NFD_QC:
type: string
NFKC_QC:
type: string
NFKD_QC:
type: string
XO_NFC:
type: boolean
XO_NFD:
type: boolean
XO_NFKC:
type: boolean
XO_NFKD:
type: boolean
nt:
type: string
nv:
anyOf:
- type: number
- type: string
jt:
type: string
jg:
type: string
Join_C:
type: boolean
lb:
type: string
ea:
type: string
Upper:
type: boolean
Lower:
type: boolean
OUpper:
type: boolean
OLower:
type: boolean
CI:
type: boolean
Cased:
type: boolean
CWCF:
type: boolean
CWCM:
type: boolean
CWL:
type: boolean
CWKCF:
type: boolean
CWT:
type: boolean
CWU:
type: boolean
isc:
type: string
hst:
type: string
JSN:
type: string
InSC:
type: string
InMC:
type: string
nullable: true
InPC:
type: string
IDS:
type: boolean
OIDS:
type: boolean
XIDS:
type: boolean
IDC:
type: boolean
OIDC:
type: boolean
XIDC:
type: boolean
Pat_Syn:
type: boolean
Pat_WS:
type: boolean
Dash:
type: boolean
Hyphen:
type: boolean
QMark:
type: boolean
Term:
type: boolean
STerm:
type: boolean
Dia:
type: boolean
Ext:
type: boolean
SD:
type: boolean
Alpha:
type: boolean
OAlpha:
type: boolean
Math:
type: boolean
OMath:
type: boolean
Hex:
type: boolean
AHex:
type: boolean
DI:
type: boolean
ODI:
type: boolean
LOE:
type: boolean
WSpace:
type: boolean
Gr_Base:
type: boolean
Gr_Ext:
type: boolean
OGr_Ext:
type: boolean
Gr_Link:
type: boolean
GCB:
type: string
WB:
type: string
SB:
type: string
Ideo:
type: boolean
UIdeo:
type: boolean
IDSB:
type: boolean
IDST:
type: boolean
Radical:
type: boolean
Dep:
type: boolean
VS:
type: boolean
NChar:
type: boolean
kAccountingNumeric:
type: string
nullable: true
kAlternateHanYu:
type: string
nullable: true
kAlternateJEF:
type: string
nullable: true
kAlternateKangXi:
type: string
nullable: true
kAlternateMorohashi:
type: string
nullable: true
kBigFive:
type: string
nullable: true
kCCCII:
type: string
nullable: true
kCNS1986:
type: string
nullable: true
kCNS1992:
type: string
nullable: true
kCangjie:
type: string
nullable: true
kCantonese:
type: string
nullable: true
kCheungBauer:
type: string
nullable: true
kCheungBauerIndex:
type: string
nullable: true
kCihaiT:
type: string
nullable: true
kCompatibilityVariant:
type: string
nullable: true
kCowles:
type: string
nullable: true
kDaeJaweon:
type: string
nullable: true
kDefinition:
type: string
nullable: true
kEACC:
type: string
nullable: true
kFenn:
type: string
nullable: true
kFennIndex:
type: string
nullable: true
kFourCornerCode:
type: string
nullable: true
kFrequency:
type: string
nullable: true
kGB0:
type: string
nullable: true
kGB1:
type: string
nullable: true
kGB3:
type: string
nullable: true
kGB5:
type: string
nullable: true
kGB7:
type: string
nullable: true
kGB8:
type: string
nullable: true
kGradeLevel:
type: string
nullable: true
kGSR:
type: string
nullable: true
kHangul:
type: string
nullable: true
kHanYu:
type: string
nullable: true
kHanyuPinlu:
type: string
nullable: true
kHanyuPinyin:
type: string
nullable: true
kHDZRadBreak:
type: string
nullable: true
kHKGlyph:
type: string
nullable: true
kHKSCS:
type: string
nullable: true
kIBMJapan:
type: string
nullable: true
kIICore:
type: string
nullable: true
kIRGDaeJaweon:
type: string
nullable: true
kIRGDaiKanwaZiten:
type: string
nullable: true
kIRGHanyuDaZidian:
type: string
nullable: true
kIRGKangXi:
type: string
nullable: true
kIRG_GSource:
type: string
nullable: true
kIRG_HSource:
type: string
nullable: true
kIRG_JSource:
type: string
nullable: true
kIRG_KPSource:
type: string
nullable: true
kIRG_KSource:
type: string
nullable: true
kIRG_MSource:
type: string
nullable: true
kIRG_TSource:
type: string
nullable: true
kIRG_USource:
type: string
nullable: true
kIRG_VSource:
type: string
nullable: true
kJHJ:
type: string
nullable: true
kJIS0213:
type: string
nullable: true
kJa:
type: string
nullable: true
kJapaneseKun:
type: string
nullable: true
kJapaneseOn:
type: string
nullable: true
kJis0:
type: string
nullable: true
kJis1:
type: string
nullable: true
kKPS0:
type: string
nullable: true
kKPS1:
type: string
nullable: true
kKSC0:
type: string
nullable: true
kKSC1:
type: string
nullable: true
kKangXi:
type: string
nullable: true
kKarlgren:
type: string
nullable: true
kKorean:
type: string
nullable: true
kLau:
type: string
nullable: true
kMainlandTelegraph:
type: string
nullable: true
kMandarin:
type: string
nullable: true
kMatthews:
type: string
nullable: true
kMeyerWempe:
type: string
nullable: true
kMorohashi:
type: string
nullable: true
kNelson:
type: string
nullable: true
kOtherNumeric:
type: string
nullable: true
kPhonetic:
type: string
nullable: true
kPrimaryNumeric:
type: string
nullable: true
kPseudoGB1:
type: string
nullable: true
kRSAdobe_Japan1_6:
type: string
nullable: true
kRSJapanese:
type: string
nullable: true
kRSKanWa:
type: string
nullable: true
kRSKangXi:
type: string
nullable: true
kRSKorean:
type: string
nullable: true
kRSMerged:
type: string
nullable: true
kRSUnicode:
type: string
nullable: true
kSBGY:
type: string
nullable: true
kSemanticVariant:
type: string
nullable: true
kSimplifiedVariant:
type: string
nullable: true
kSpecializedSemanticVariant:
type: string
nullable: true
kTaiwanTelegraph:
type: string
nullable: true
kTang:
type: string
nullable: true
kTotalStrokes:
type: string
nullable: true
kTraditionalVariant:
type: string
nullable: true
kVietnamese:
type: string
nullable: true
kXHC1983:
type: string
nullable: true
kWubi:
type: string
nullable: true
kXerox:
type: string
nullable: true
kZVariant:
type: string
nullable: true
blk:
type: string
scx:
type: string
nullable: true
bpt:
type: string
image:
type: string
nullable: true
sc:
type: string
abstract:
type: string
nullable: true
cf:
type: array
items:
type: integer
NFKC_CF:
type: array
items:
type: integer
lc:
type: array
items:
type: integer
FC_NFKC:
type: array
items:
type: integer
slc:
type: array
items:
type: integer
bpb:
type: array
items:
type: integer
uc:
type: array
items:
type: integer
tc:
type: array
items:
type: integer
suc:
type: array
items:
type: integer
stc:
type: array
items:
type: integer
scf:
type: array
items:
type: integer
dm:
type: array
items:
type: integer
"/block/{block}":
parameters:
- name: block
description: the name of the block in abbreviated Unicode notation
required: true
in: path
schema:
type: string
get:
operationId: block
summary: show detailed information about a Unicode block
responses:
"200":
description: properties of the given block
content:
application/json:
schema:
type: object
required:
- name
- first
- last
properties:
name:
type: string
first:
$ref: '#/components/schemas/u_codepoint'
last:
$ref: '#/components/schemas/u_codepoint'
next_block:
type: string
prev_block:
type: string
"/plane/{plane}":
parameters:
- name: plane
required: true
in: path
schema:
type: string
get:
operationId: plane
summary: show information about a Unicode plane
responses:
"200":
description: properties of the given plane
content:
application/json:
schema:
type: object
properties:
name:
type: string
first:
$ref: '#/components/schemas/u_codepoint'
last:
$ref: '#/components/schemas/u_codepoint'
blocks:
type: array
items:
type: string
next_plane:
type: string
prev_plane:
type: string
"/glyph/{codepoint}":
parameters:
- $ref: '#/components/parameters/codepoint'
get:
operationId: glyph
summary: get an example glyph for a code point as PNG
responses:
"200":
description: the glyph as PNG
content:
image/png:
schema:
type: string
"/name/{codepoint}":
parameters:
- $ref: '#/components/parameters/codepoint'
get:
operationId: name
summary: get the canonical Unicode name for a code point
responses:
"200":
description: the name
content:
application/json:
schema:
type: string
text/plain:
schema:
type: string
"/transform/{action}/{data}":
parameters:
- name: action
in: path
required: true
schema:
type: string
enum:
- lower
- upper
- title
- mirror
- nfc
- nfd
- nfkc
- nfkd
- name: data
in: path
required: true
schema:
type: string
get:
operationId: transform
summary: transform a string to another according to a mapping, e.g., making all characters upper-case.
responses:
"200":
description: the transformed string
content:
application/json:
schema:
type: string
text/plain:
schema:
type: string
"/filter/{data}":
parameters:
- name: data
in: path
required: true
schema:
type: string
- name: property
in: query
schema:
type: string
get:
operationId: filter
summary: Filter a string of characters by Unicode property
description: |
You can negate properties by appending a “!” to it:
filter/string?age!=5.5 finds all characters in “string” that were
*not* added in Unicode 5.5.
responses:
"200":
description: the filtered string
content:
application/json:
schema:
type: string
text/plain:
schema:
type: string
"/property/{property}":
parameters:
- name: property
in: path
required: true
schema:
type: string
get:
operationId: property
summary: show a PNG image where every code point is represented by one pixel
description: |
The pixel color determines the value.
responses:
"200":
description: the property values as PNG with one pixel per code point
content:
image/png:
schema:
type: string
"/script/{iso}":
parameters:
- name: iso
required: true
in: path
schema:
type: string
pattern: '^[A-Z][a-z]{3}$'
get:
operationId: script
summary: Specify one or more ISO short names separated by comma
responses:
"200":
description: a list of detail informations about these scripts
content:
application/json:
schema:
type: object
properties:
name:
type: string
"/search":
parameters:
- name: property
in: query
schema:
type: string
- name: page
in: query
schema:
type: integer
minimum: 1
- name: per_page
in: query
schema:
type: integer
minimum: 1
get:
operationId: search
summary: search for code points by their properties
responses:
"200":
description: the list of code points and additional information
content:
application/json:
schema:
type: object
properties:
results:
type: array
items:
type: integer
page:
type: integer
last_page:
type: integer
per_page:
type: integer
count:
type: integer
"/oembed":
parameters:
- name: url
schema:
type: string
format: uri
in: query
- name: format
schema:
type: string
enum:
- xml
- json
in: query
- name: maxwidth
schema:
type: integer
in: query
- name: maxheight
schema:
type: integer
in: query
get:
operationId: oembed
summary: oEmbed API endpoint for URLs matching “codepoints.net”
responses:
"200":
description: oEmbed-compatible response
content:
application/json:
schema:
type: object
properties:
type:
type: string
enum:
- rich
version:
type: string
enum:
- '1.0'
title:
type: string
author_url:
type: string
provider_name:
type: string
enum:
- 'Codepoints.net'
provider_url:
type: string
cache_age:
type: integer
thumbnail_url:
type: string
html:
type: string
width:
type: integer
height:
type: integer