Apigee Smartdocs Maven Plugin version1.0.3 source code

pengdu30
Participant II

We are currently using apigee-smartdocs-maven-plugin 1.0.3 to publish our OpenAPI spec to our apigee developer portal. In current version, the title in the spec file used as the model name (unique key of the model on Drupal) and we plan to use customized key as model name. We tried with 1.0.3 which support adding customized fields by using portal.model.fields, but when try to test using the code in master branch for publishing same OpenAPI we saw following error in log: apimodel failed: Adding field data failure: 406 Not Acceptable [ERROR] ["taxonomy_term"]

Could you please let me know the release level of code in master branch or how can I get source code of 1.0.3 version?

Your help much appreciated.

0 7 191
7 REPLIES 7

pengdu30
Participant II

I think I found the issue, the official repo is: apigee/apigee-smartdocs-maven-plugin. In my case, I got the code from repo: ssvaidyanathan/apigee-smartdocs-maven-plugin.

HI @Peng Du

Repo - https://github.com/apigee/apigee-smartdocs-maven-plugin. I have deleted my personal repo to avoid confusion 🙂

Hope you have the info to resolve the issue. The latest version is 1.0.4, so please use that.

@Sai Saran Vaidyanathan Thanks for your reply. I found the code now. We plan to use 1.0.4 code and enhance it to support generate unique developer portal model name and at same time make it backward compatible with current implementation (1.0.3) which is using title in swagger file as the mode name. Any suggestion of how to make it more general and eventually can be leveraged by other people will be much appreciated. For now we plan to add customized fields and use added fields to define the rules and based on the rules to generate the unique model name. We are open to evaluate any suggestions.

@Peng Du - why would you want them to be generated ? If you are working on a spec and pushing that as a model, when it gets updated shouldn't the same model be updated. Not clear why you would need to create multiple models.

However if you plan to add new feature, would appreciate if you can fork the repo and submit a PR with complete details. You will need to accept Google CLA as well. More info here

@Sai Saran Vaidyanathan We have some complex situations need to handle. The reason we need this feature is because we have OpenAPI spec by region they will have same title in swagger file, they are technically different APIs, but ask developer team change the title will not make scenes since for display we want the display name continue to use title, but for model name each region's OpenAPI will have a different model name. This is supported by developer portal, but current plugin use title as both display name and model name (system name). We will follow the instructions to submit PR request with details of our change. We also discussed this change with Gitesh Koli and Rakesh Talanki.

Can you not change the title name during build time (using Maven replacer plugin or something equivalent) that updates the title and then run the maven command to publish ? In that case you are not changing anything.

If you still need to make the change, please go ahead. Please submit the PR. I will look into it. I would recommend you code it in such a way that is uses the title if you dont extend the name.

Thank you for the suggestion however this would require change in yaml to add identifier for the replacer plugin to then pick up correct? target/${project.artifactId} We need a unique system model name (while allowing the duplicate model display names) to be dynamically generated and to be based on a config of combined fields so it can be easily modified for sequence of designated attributes, we'll also include a parameter for the separator character. This doubles as then value-add to the project and not specific to our use case.