Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #24 #26

Closed
wants to merge 4 commits into from
Closed

Fix for #24 #26

wants to merge 4 commits into from

Conversation

nandoan
Copy link

@nandoan nandoan commented Mar 24, 2021

Adding a new optional property to configure the API Identification field, as described in #24.

@giteshk giteshk linked an issue Jun 18, 2021 that may be closed by this pull request
String apiIdField = profile.getApiIdField();
String apiIdValue = null;
if (apiIdField != null && !apiIdField.equals("title")) {
Map<String, Object> result = loadApiConfigFile(profile);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nandoan - Can you add the entry in the apicatalog json. Its missing in the PR

@@ -23,6 +23,7 @@
<portal.api.doc.format>basic_html</portal.api.doc.format><!-- Format in the portal. Values: basic_html, restricted_html, full_html -->
<portal.directory>./specs</portal.directory> <!-- Directory where OpenAPI specs are accessible. Using ./specs for sample -->
<apigee.smartdocs.config.file>./apicatalog-config.json</apigee.smartdocs.config.file> <!-- Config for fields -->
<portal.api.id.field>title</portal.api.id.field>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nandoan - Why do I need this entry in the pom file? Why not just get the entry from apicatalog json as you are looking for "title" anyways?

logger.info("Getting API doc for "+ spec.getTitle());
String apiIdField = profile.getApiIdField();
String apiIdValue = null;
if (apiIdField != null && !apiIdField.equals("title")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nandoan - not sure I prefer the title check being hardcoded, then it doesnt make sense to have this in the pom as a property. The ideal thing would be to just look for the title field in the apicatalog json or else get the value from the pom and see if that matches any key in the apicatalog json and use that value in the code.

@ssvaidyanathan
Copy link
Collaborator

Closing this.. Please reopen if you take care of the comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable field for API Identification
2 participants