@@ -197,33 +197,35 @@ else if(model instanceof ArrayModel) {
197
197
else if (model instanceof ModelImpl ) {
198
198
ModelImpl impl = (ModelImpl ) model ;
199
199
Map <String , Property > properties = impl .getProperties ();
200
- for (String propertyName : properties .keySet ()) {
201
- Property property = properties .get (propertyName );
202
- if (property instanceof RefProperty ) {
203
- RefProperty ref = (RefProperty )property ;
204
- if (ref .get$ref () != null && ref .get$ref ().startsWith ("http" )) {
205
- LOGGER .debug ("added reference to " + ref .get$ref ());
206
- resolutionMap .put (ref .get$ref (), new ResolutionContext (ref , impl , "ref" ));
207
- }
208
- }
209
- else if (property instanceof ArrayProperty ) {
210
- ArrayProperty arrayProperty = (ArrayProperty ) property ;
211
- if (arrayProperty .getItems () != null && arrayProperty .getItems () instanceof RefProperty ) {
212
- RefProperty ref = (RefProperty )arrayProperty .getItems ();
200
+ if (properties != null ) {
201
+ for (String propertyName : properties .keySet ()) {
202
+ Property property = properties .get (propertyName );
203
+ if (property instanceof RefProperty ) {
204
+ RefProperty ref = (RefProperty )property ;
213
205
if (ref .get$ref () != null && ref .get$ref ().startsWith ("http" )) {
214
206
LOGGER .debug ("added reference to " + ref .get$ref ());
215
- resolutionMap .put (ref .get$ref (), new ResolutionContext (ref , arrayProperty , "ref" ));
207
+ resolutionMap .put (ref .get$ref (), new ResolutionContext (ref , impl , "ref" ));
216
208
}
217
209
}
218
- }
219
- else if (property instanceof MapProperty ) {
220
- MapProperty mp = (MapProperty ) property ;
221
- if (mp .getAdditionalProperties () != null && mp .getAdditionalProperties () instanceof RefProperty ) {
222
- RefProperty ref = (RefProperty )mp .getAdditionalProperties ();
223
- if (ref .get$ref () != null && ref .get$ref ().startsWith ("http" )) {
224
- LOGGER .debug ("added reference to " + ref .get$ref ());
225
- resolutionMap .put (ref .get$ref (), new ResolutionContext (ref , mp , "ref" ));
226
- }
210
+ else if (property instanceof ArrayProperty ) {
211
+ ArrayProperty arrayProperty = (ArrayProperty ) property ;
212
+ if (arrayProperty .getItems () != null && arrayProperty .getItems () instanceof RefProperty ) {
213
+ RefProperty ref = (RefProperty )arrayProperty .getItems ();
214
+ if (ref .get$ref () != null && ref .get$ref ().startsWith ("http" )) {
215
+ LOGGER .debug ("added reference to " + ref .get$ref ());
216
+ resolutionMap .put (ref .get$ref (), new ResolutionContext (ref , arrayProperty , "ref" ));
217
+ }
218
+ }
219
+ }
220
+ else if (property instanceof MapProperty ) {
221
+ MapProperty mp = (MapProperty ) property ;
222
+ if (mp .getAdditionalProperties () != null && mp .getAdditionalProperties () instanceof RefProperty ) {
223
+ RefProperty ref = (RefProperty )mp .getAdditionalProperties ();
224
+ if (ref .get$ref () != null && ref .get$ref ().startsWith ("http" )) {
225
+ LOGGER .debug ("added reference to " + ref .get$ref ());
226
+ resolutionMap .put (ref .get$ref (), new ResolutionContext (ref , mp , "ref" ));
227
+ }
228
+ }
227
229
}
228
230
}
229
231
}
0 commit comments