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

my code is inside src directly and not in src/main/java and apis are not scanned #3

Open
jcodemani opened this issue Mar 23, 2017 · 3 comments

Comments

@jcodemani
Copy link

Hi,

      I also copied code under src/main/java and running the ant task.

so the directory structure was
src

  • com
    • companyname
  • main
    • java
      • com
      • companyname

I ran the task from above src folder which is root folder of my project
still it is not detecting the apis

I do not use maven and I am using apache wink for rest api implementation.
Can you please suggest any other workaround or plugin that I can use to generate swagger doc at compile time??

Thanks,
jcodemani

@cstroe
Copy link
Owner

cstroe commented Mar 23, 2017

If your source code is under src and not src/main/java, I would recommend making a symlink:

cd src
mkdir main
cd main
ln -s ../../src java

Let me know how that works.

@jcodemani
Copy link
Author

I tried it out still it is not generating proper document it is generating the following documentation:
{
"apiVersion" : "v1",
"swaggerVersion" : "1.2",
"basePath" : "https://insu.rti.com/insu/users"
}

in service.json

Following are the logs:

swaggertask.first:
[swagger] log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
[swagger] log4j:WARN Please initialize the log4j system properly.
[swagger] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[swagger] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[swagger] SLF4J: Defaulting to no-operation (NOP) logger implementation
[swagger] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

com.rti.api.poc.rest /rtiapi v1
					                    <!---Swagger JSON parameters BEGIN-->
					                    <swaggerDirectory>generated/swagger-ui</swaggerDirectory>
					                    <swaggerUIDocBasePath>https://insu.rti.com/insu/users</swaggerUIDocBasePath>
					                    <useOutputFlatStructure>false</useOutputFlatStructure>
				</apiSource>
			</apiSources>
		</swagger>
	</target>

@jcodemani
Copy link
Author

com.ibm.cm.api.contract.rest /cmapi v1
					                    <!---Swagger JSON parameters BEGIN-->
					                    <swaggerDirectory>generated/swagger-ui</swaggerDirectory>
					                              <swaggerUIDocBasePath>https://insu.rti.com/insu/users</swaggerUIDocBasePath>
					                    <useOutputFlatStructure>false</useOutputFlatStructure>
				</apiSource>
			</apiSources>
		</swagger>
	</target>

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

No branches or pull requests

2 participants