@@ -33,6 +33,77 @@ router.get('/registry/org/:shortname/users',
3333 controller . USER_ALL )
3434
3535router . get ( '/registry/org/:shortname/id_quota' ,
36+ /*
37+ #swagger.tags = ['Registry Organization']
38+ #swagger.operationId = 'orgIdQuota'
39+ #swagger.summary = "Retrieves an organization's CVE ID quota (accessible to all registered users)"
40+ #swagger.description = "
41+ <h2>Access Control</h2>
42+ <p>All registered users can access this endpoint</p>
43+ <h2>Expected Behavior</h2>
44+ <p><b>Regular, CNA & Admin Users:</b> Retrieves the CVE ID quota for the user's organization</p>
45+ <p><b>Secretariat:</b> Retrieves the CVE ID quota for any organization</p>"
46+ #swagger.parameters['shortname'] = { description: 'The shortname of the organization' }
47+ #swagger.parameters['$ref'] = [
48+ '#/components/parameters/registry',
49+ '#/components/parameters/apiEntityHeader',
50+ '#/components/parameters/apiUserHeader',
51+ '#/components/parameters/apiSecretHeader'
52+ ]
53+ #swagger.responses[200] = {
54+ description: 'Returns the CVE ID quota for an organization',
55+ content: {
56+ "application/json": {
57+ schema: {
58+ oneOf: [
59+ { $ref: '../schemas/org/get-org-quota-response.json' },
60+ { $ref: '../schemas/registry-org/get-registry-org-quota-response.json' }
61+ ]
62+ }
63+ }
64+ }
65+ }
66+ #swagger.responses[400] = {
67+ description: 'Bad Request',
68+ content: {
69+ "application/json": {
70+ schema: { $ref: '../schemas/errors/bad-request.json' }
71+ }
72+ }
73+ }
74+ #swagger.responses[401] = {
75+ description: 'Not Authenticated',
76+ content: {
77+ "application/json": {
78+ schema: { $ref: '../schemas/errors/generic.json' }
79+ }
80+ }
81+ }
82+ #swagger.responses[403] = {
83+ description: 'Forbidden',
84+ content: {
85+ "application/json": {
86+ schema: { $ref: '../schemas/errors/generic.json' }
87+ }
88+ }
89+ }
90+ #swagger.responses[404] = {
91+ description: 'Not Found',
92+ content: {
93+ "application/json": {
94+ schema: { $ref: '../schemas/errors/generic.json' }
95+ }
96+ }
97+ }
98+ #swagger.responses[500] = {
99+ description: 'Internal Server Error',
100+ content: {
101+ "application/json": {
102+ schema: { $ref: '../schemas/errors/generic.json' }
103+ }
104+ }
105+ }
106+ */
36107 mw . useRegistry ( ) ,
37108 mw . validateUser ,
38109 param ( [ 'shortname' ] ) . isString ( ) . trim ( ) . notEmpty ( ) . isLength ( { min : CONSTANTS . MIN_SHORTNAME_LENGTH , max : CONSTANTS . MAX_SHORTNAME_LENGTH } ) ,
0 commit comments