Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
lnash94 committed Nov 15, 2024
1 parent ab832d8 commit 1f950bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package io.ballerina.openapi.service.mapper.type;

import io.ballerina.compiler.api.SemanticModel;
import io.ballerina.compiler.api.SemanticModel;
import io.ballerina.compiler.api.symbols.IntersectionTypeSymbol;
import io.ballerina.compiler.api.symbols.RecordFieldSymbol;
Expand Down Expand Up @@ -56,7 +55,6 @@
import static io.ballerina.openapi.service.mapper.Constants.NAME_CONFIG;
import static io.ballerina.openapi.service.mapper.Constants.VALUE;
import static io.ballerina.openapi.service.mapper.utils.MapperCommonUtils.getNameFromAnnotation;
import static io.ballerina.openapi.service.mapper.utils.MapperCommonUtils.getExpressionNodeForConstantDeclaration;
import static io.ballerina.openapi.service.mapper.utils.MapperCommonUtils.getRecordFieldTypeDescription;
import static io.ballerina.openapi.service.mapper.utils.MapperCommonUtils.getTypeName;

Expand Down Expand Up @@ -263,9 +261,10 @@ public static Map<String, Schema> mapRecordFields(Map<String, RecordFieldSymbol>
public static Map<String, Schema> mapRecordFields(Map<String, RecordFieldSymbol> recordFieldMap,
Components components, Set<String> requiredFields,
String recordName, boolean treatNilableAsOptional,
AdditionalData additionalData) {
AdditionalData additionalData,
Set<String> fieldsOnlyForRequiredList) {
return mapRecordFields(recordFieldMap, components, requiredFields, recordName, treatNilableAsOptional,
true, additionalData);
true, additionalData, fieldsOnlyForRequiredList);
}

private static String getRecordFieldName(boolean inferNameFromJsonData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,18 +588,6 @@ public static Node getTypeDescriptor(TypeDefinitionNode typeDefinitionNode) {
return node;
}

public static ExpressionNode getExpressionNodeForConstantDeclaration(ModuleMemberVisitor moduleMemberVisitor,
ExpressionNode defaultValueExpression,
SimpleNameReferenceNode reference) {
Optional<ConstantDeclarationNode> constantDeclarationNode = moduleMemberVisitor
.getConstantDeclarationNode(reference.name().text());
if (constantDeclarationNode.isPresent()) {
ConstantDeclarationNode constantNode = constantDeclarationNode.get();
defaultValueExpression = (ExpressionNode) constantNode.initializer();
}
return defaultValueExpression;
}

public static String getNameFromAnnotation(String packageName, String annotationName, String annotationFieldName,
SemanticModel semanticModel, String defaultName,
RecordFieldSymbol recordField) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ paths:
schema:
type: string
default: Pod
- name: header31
in: header
schema:
type: string
default: Pod
- name: header32
in: header
required: true
Expand All @@ -156,6 +151,11 @@ paths:
- 1
- 2
- 3
- name: header31
in: header
schema:
type: string
default: Pod
responses:
"200":
description: Ok
Expand Down

0 comments on commit 1f950bd

Please sign in to comment.