source: node_modules/swagger-client/es/specmap/lib/properties.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 551 bytes
Line 
1import lib from './index.js';
2export default {
3 key: 'properties',
4 plugin: (properties, key, fullPath, specmap) => {
5 const val = {
6 ...properties
7 };
8
9 // eslint-disable-next-line no-restricted-syntax, guard-for-in
10 for (const k in properties) {
11 try {
12 val[k].default = specmap.modelPropertyMacro(val[k]);
13 } catch (e) {
14 const err = new Error(e);
15 err.fullPath = fullPath; // This is an array
16 return err;
17 }
18 }
19 const patch = lib.replace(fullPath, val);
20 return patch;
21 }
22};
Note: See TracBrowser for help on using the repository browser.