Skip to content
Snippets Groups Projects
Commit 9026377f authored by Jueun Park's avatar Jueun Park
Browse files

fix Parser.jrag

parent c2222fd6
Branches
No related tags found
1 merge request!1Tests/openapi generator
...@@ -277,7 +277,6 @@ EnumObj ::= <EnumOb:Object>; ...@@ -277,7 +277,6 @@ EnumObj ::= <EnumOb:Object>;
RequiredField ::= <Value>; RequiredField ::= <Value>;
rel SchemaReference.r -> SchemaObject; rel SchemaReference.r -> SchemaObject;
rel SchemaObject.a? -> AdditionalProperties;
rel SchemaObject.d? -> DiscriminatorObject; rel SchemaObject.d? -> DiscriminatorObject;
rel SchemaObject.e* -> EnumObj; rel SchemaObject.e* -> EnumObj;
rel SchemaObject.el* -> ExampleElement; rel SchemaObject.el* -> ExampleElement;
......
...@@ -55,7 +55,7 @@ aspect Parser { ...@@ -55,7 +55,7 @@ aspect Parser {
return openapi; return openapi;
} }
public static InfoObject InfoObject.parseInfo(Info info) { public static InfoObject InfoObject.parseInfo(io.swagger.v3.oas.models.info.Info info) {
InfoObject infoObject = new InfoObject(); InfoObject infoObject = new InfoObject();
if (info.getTitle() != null) if (info.getTitle() != null)
...@@ -82,7 +82,7 @@ aspect Parser { ...@@ -82,7 +82,7 @@ aspect Parser {
return infoObject; return infoObject;
} }
public static ContactObject ContactObject.parseContact(Contact contact){ public static ContactObject ContactObject.parseContact(io.swagger.v3.oas.models.info.Contact contact){
ContactObject contactObject = new ContactObject(); ContactObject contactObject = new ContactObject();
if (contact.getName() != null) if (contact.getName() != null)
...@@ -99,7 +99,7 @@ aspect Parser { ...@@ -99,7 +99,7 @@ aspect Parser {
return contactObject; return contactObject;
} }
public static LicenseObject LicenseObject.parseLicense(License license){ public static LicenseObject LicenseObject.parseLicense(io.swagger.v3.oas.models.info.License license){
LicenseObject licenseObject = new LicenseObject(); LicenseObject licenseObject = new LicenseObject();
if (license.getName() != null) if (license.getName() != null)
...@@ -283,7 +283,7 @@ aspect Parser { ...@@ -283,7 +283,7 @@ aspect Parser {
return pathItem; return pathItem;
} }
public static OperationObject OperationObject.parseOperation(Operation operation) { public static OperationObject OperationObject.parseOperation(io.swagger.v3.oas.models.Operation operation) {
OperationObject operationObject = new OperationObject(); OperationObject operationObject = new OperationObject();
if (operation.getDeprecated() != null) if (operation.getDeprecated() != null)
...@@ -320,7 +320,7 @@ aspect Parser { ...@@ -320,7 +320,7 @@ aspect Parser {
operationObject.addC(new CallbackTuple(key, CallbackObject.parseCallback(operation.getCallbacks().get(key)))); operationObject.addC(new CallbackTuple(key, CallbackObject.parseCallback(operation.getCallbacks().get(key))));
} }
if (operation.getSecurity().size() != 0) { if (operation.getSecurity().size() != 0) {
for (SecurityRequirement s : operation.getSecurity()) for (io.swagger.v3.oas.models.security.SecurityRequirement s : operation.getSecurity())
operationObject.addSr(SecurityRequirementObject.parseSecurityRequirement(s)); operationObject.addSr(SecurityRequirementObject.parseSecurityRequirement(s));
} }
if (operation.getServers() != null) { if (operation.getServers() != null) {
...@@ -335,16 +335,16 @@ aspect Parser { ...@@ -335,16 +335,16 @@ aspect Parser {
return operationObject; return operationObject;
} }
public static ExternalDocObject ExternalDocObject.parseExternalDocs(ExternalDocs externalDocs){ public static ExternalDocObject ExternalDocObject.parseExternalDocs(ExternalDocumentation externalDocs){
ExternalDocObject externalDocObject = new ExternalDocObject(); ExternalDocObject externalDocObject = new ExternalDocObject();
if (externalDocs.getDescription() != null) if (externalDocs.getDescription() != null)
externalDocObject.setDescription(externalDocs.getDescription()); externalDocObject.setDescription(externalDocs.getDescription());
if (externalDocs.getUrl() != null) if (externalDocs.getUrl() != null)
externalDocObject.setUrl(externalDocs.getUrl()); externalDocObject.setUrl(externalDocs.getUrl());
if (externalDocs.getVendorExtensions() != null) { if (externalDocs.getExtensions() != null) {
for (String key : externalDocs.getVendorExtensions().keySet()) for (String key : externalDocs.getExtensions().keySet())
externalDocObject.addEx(new Extension(key, externalDocs.getVendorExtensions().get(key))); externalDocObject.addEx(new Extension(key, externalDocs.getExtensions().get(key)));
} }
return externalDocObject; return externalDocObject;
...@@ -456,7 +456,7 @@ aspect Parser { ...@@ -456,7 +456,7 @@ aspect Parser {
return mediaTypeObject; return mediaTypeObject;
} }
public static EncodingObject EncodingObject.parseEncoding(EncodingProperty encodingProperty) { public static EncodingObject EncodingObject.parseEncoding(Encoding encodingProperty) {
EncodingObject encodingObject = new EncodingObject(); EncodingObject encodingObject = new EncodingObject();
if (encodingProperty.getContentType() != null) if (encodingProperty.getContentType() != null)
...@@ -501,7 +501,7 @@ aspect Parser { ...@@ -501,7 +501,7 @@ aspect Parser {
} }
if (response.getContent().size() != 0) { if (response.getContent().size() != 0) {
for (String key : response.getContent().keySet()) for (String key : response.getContent().keySet())
responseObject.addC(new ContentTuple(key, MediaTypeObject.parseMediaType(response.getContent().get(key))))); responseObject.addC(new ContentTuple(key, MediaTypeObject.parseMediaType(response.getContent().get(key))));
} }
if (response.getLinks().size() != 0) { if (response.getLinks().size() != 0) {
for (String key : response.getLinks().keySet()) for (String key : response.getLinks().keySet())
...@@ -629,7 +629,7 @@ aspect Parser { ...@@ -629,7 +629,7 @@ aspect Parser {
} }
if (header.getContent().size() != 0) { if (header.getContent().size() != 0) {
for (String key : header.getContent().keySet()) for (String key : header.getContent().keySet())
headerObject.addC(new ContentTuple(key, MediaTypeObject.parseMediaType(header.getContent().get(key))))); headerObject.addC(new ContentTuple(key, MediaTypeObject.parseMediaType(header.getContent().get(key))));
} }
if (header.getSchema() != null) if (header.getSchema() != null)
headerObject.set_impl_s(SchemaOb.parseSchema(header.getSchema())); headerObject.set_impl_s(SchemaOb.parseSchema(header.getSchema()));
...@@ -642,7 +642,7 @@ aspect Parser { ...@@ -642,7 +642,7 @@ aspect Parser {
return headerObject; return headerObject;
} }
public static TagObject TagObject.parseTag(Tag tag){ public static TagObject TagObject.parseTag(io.swagger.v3.oas.models.tags.Tag tag){
TagObject tagObject = new TagObject(); TagObject tagObject = new TagObject();
tagObject.setName(tag.getName()); tagObject.setName(tag.getName());
...@@ -807,7 +807,7 @@ aspect Parser { ...@@ -807,7 +807,7 @@ aspect Parser {
return discriminatorObject; return discriminatorObject;
} }
public static XmlObject XmlObject.parseXml (Xml xml) { public static XmlObject XmlObject.parseXml (XML xml) {
XmlObject xmlObject = new XmlObject(); XmlObject xmlObject = new XmlObject();
if (xml.getName() != null) if (xml.getName() != null)
...@@ -875,19 +875,19 @@ aspect Parser { ...@@ -875,19 +875,19 @@ aspect Parser {
AuthorizationCode authorizationCode = new AuthorizationCode(); AuthorizationCode authorizationCode = new AuthorizationCode();
if (oAuthFlows.getImplicit() != null) { if (oAuthFlows.getImplicit() != null) {
implicit.set_impl_o(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getImplicit(), map)); implicit.set_impl_o(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getImplicit()));
oAuthFlowsObject.set_impl_i(implicit); oAuthFlowsObject.set_impl_i(implicit);
} }
if (oAuthFlows.getPassword() != null) { if (oAuthFlows.getPassword() != null) {
password.set_impl_o(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getPassword(), map)); password.set_impl_o(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getPassword()));
oAuthFlowsObject.set_impl_p(password); oAuthFlowsObject.set_impl_p(password);
} }
if (oAuthFlows.getClientCredentials() != null) { if (oAuthFlows.getClientCredentials() != null) {
clientCredentials.set_impl_o(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getClientCredentials(), map)); clientCredentials.set_impl_o(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getClientCredentials()));
oAuthFlowsObject.set_impl_c(clientCredentials); oAuthFlowsObject.set_impl_c(clientCredentials);
} }
if (oAuthFlows.getAuthorizationCode() != null) { if (oAuthFlows.getAuthorizationCode() != null) {
authorizationCode.set_impl_o(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getAuthorizationCode(), map)); authorizationCode.set_impl_o(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getAuthorizationCode()));
oAuthFlowsObject.set_impl_a(authorizationCode); oAuthFlowsObject.set_impl_a(authorizationCode);
} }
if (oAuthFlows.getExtensions() != null) { if (oAuthFlows.getExtensions() != null) {
...@@ -917,7 +917,7 @@ aspect Parser { ...@@ -917,7 +917,7 @@ aspect Parser {
return oAuthFlowObject; return oAuthFlowObject;
} }
public static SecurityRequirementObject SecurityRequirementObject.parseSecurityRequirement(SecurityRequirement securityRequirement){ public static SecurityRequirementObject SecurityRequirementObject.parseSecurityRequirement(io.swagger.v3.oas.models.security.SecurityRequirement securityRequirement){
SecurityRequirementObject securityRequirementObject = new SecurityRequirementObject(); SecurityRequirementObject securityRequirementObject = new SecurityRequirementObject();
if (securityRequirement != null) { if (securityRequirement != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment