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

item must not be blank #21

Open
shiv-tbca opened this issue May 11, 2018 · 3 comments
Open

item must not be blank #21

shiv-tbca opened this issue May 11, 2018 · 3 comments

Comments

@shiv-tbca
Copy link

java -jar ./build/libs/swagger2markup-cli-1.3.3.jar convert -i wallet-server.yml -d ./output
02:49:47.261 [main] INFO io.swagger.parser.Swagger20Parser - reading from /Users/shiv/Development/tbca/swagger/swagger2markup-cli/wallet-server.yml
02:49:47.988 [main] DEBUG i.g.s.i.document.PathsDocument - Generate examples is disabled.
02:49:47.988 [main] DEBUG i.g.s.i.document.PathsDocument - Create separated operation files is disabled.
02:49:47.989 [main] DEBUG i.g.s.i.document.DefinitionsDocument - Create separated definition files is disabled.
02:49:48.319 [main] INFO i.g.s.m.b.i.asciidoc.AsciiDocBuilder - Markup document written to: /Users/shiv/Development/tbca/swagger/swagger2markup-cli/./output/overview.adoc
02:49:48.457 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'submitMerchantChargeRequest' (normalized id = 'submitMerchantChargeRequest')
02:49:48.505 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'submitMerchantDepositRequest' (normalized id = 'submitMerchantDepositRequest')
02:49:48.540 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'submitMerchantRefundRequest' (normalized id = 'submitMerchantRefundRequest')
02:49:48.563 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'submitMerchantRefundCreditRequest' (normalized id = 'submitMerchantRefundCreditRequest')
02:49:48.591 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'submitMerchantRemitRequest' (normalized id = 'submitMerchantRemitRequest')
02:49:48.615 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'submitMerchantRequestForPayment' (normalized id = 'submitMerchantRequestForPayment')
02:49:48.636 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'submitMerchantTransferCreditRequest' (normalized id = 'submitMerchantTransferCreditRequest')
02:49:48.656 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'submitMerchantWithdrawRequest' (normalized id = 'submitMerchantWithdrawRequest')
02:49:48.679 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'getMerchantBalances' (normalized id = 'getMerchantBalances')
02:49:48.702 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'getMerchantTransactionHistory' (normalized id = 'getMerchantTransactionHistory')
02:49:48.714 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'getMerchantUsers' (normalized id = 'getMerchantUsers')
02:49:48.733 [main] DEBUG i.g.s.i.document.PathsDocument - Operation processed : 'getUserMerchantBalances' (normalized id = 'getUserMerchantBalances')
Exception in thread "main" java.lang.IllegalArgumentException: item must not be blank
at org.apache.commons.lang3.Validate.notBlank(Validate.java:451)
at io.github.swagger2markup.markup.builder.internal.AbstractMarkupDocBuilder.unorderedListItem(AbstractMarkupDocBuilder.java:333)
at io.github.swagger2markup.markup.builder.internal.AbstractMarkupDocBuilder.unorderedList(AbstractMarkupDocBuilder.java:327)
at io.github.swagger2markup.markup.builder.internal.asciidoc.AsciiDocBuilder.unorderedList(AsciiDocBuilder.java:140)
at io.github.swagger2markup.internal.component.ConsumesComponent.apply(ConsumesComponent.java:44)
at io.github.swagger2markup.internal.component.PathOperationComponent.buildConsumesSection(PathOperationComponent.java:290)
at io.github.swagger2markup.internal.component.PathOperationComponent.apply(PathOperationComponent.java:110)
at io.github.swagger2markup.internal.document.PathsDocument.applyPathOperationComponent(PathsDocument.java:223)
at io.github.swagger2markup.internal.document.PathsDocument.buildOperation(PathsDocument.java:207)
at io.github.swagger2markup.internal.document.PathsDocument.lambda$buildsPathsSection$0(PathsDocument.java:119)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at io.github.swagger2markup.internal.document.PathsDocument.buildsPathsSection(PathsDocument.java:119)
at io.github.swagger2markup.internal.document.PathsDocument.apply(PathsDocument.java:103)
at io.github.swagger2markup.Swagger2MarkupConverter.applyPathsDocument(Swagger2MarkupConverter.java:197)
at io.github.swagger2markup.Swagger2MarkupConverter.toFolder(Swagger2MarkupConverter.java:182)
at io.github.swagger2markup.cli.Application.run(Application.java:86)
at io.github.swagger2markup.cli.Application.main(Application.java:61)

wallet-server.txt

@amal-san
Copy link

amal-san commented Dec 5, 2019

Same error here 😞

Exception in thread "main" java.lang.NullPointerException: Type of parameter 'folderPath' must not be blank
	at org.apache.commons.lang3.Validate.notBlank(Validate.java:448)
	at io.github.swagger2markup.internal.type.BasicType.<init>(BasicType.java:41)
	at io.github.swagger2markup.internal.adapter.ParameterAdapter.getType(ParameterAdapter.java:176)
	at io.github.swagger2markup.internal.adapter.ParameterAdapter.<init>(ParameterAdapter.java:57)
	at io.github.swagger2markup.internal.component.ParameterTableComponent.apply(ParameterTableComponent.java:91)
	at io.github.swagger2markup.internal.component.PathOperationComponent.buildParametersSection(PathOperationComponent.java:198)
	at io.github.swagger2markup.internal.component.PathOperationComponent.apply(PathOperationComponent.java:100)
	at io.github.swagger2markup.internal.document.PathsDocument.applyPathOperationComponent(PathsDocument.java:223)
	at io.github.swagger2markup.internal.document.PathsDocument.buildOperation(PathsDocument.java:207)
	at io.github.swagger2markup.internal.document.PathsDocument.lambda$buildsPathsSection$0(PathsDocument.java:119)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at io.github.swagger2markup.internal.document.PathsDocument.buildsPathsSection(PathsDocument.java:119)
	at io.github.swagger2markup.internal.document.PathsDocument.apply(PathsDocument.java:103)
	at io.github.swagger2markup.Swagger2MarkupConverter.applyPathsDocument(Swagger2MarkupConverter.java:197)
	at io.github.swagger2markup.Swagger2MarkupConverter.toFolder(Swagger2MarkupConverter.java:182)
	at io.github.swagger2markup.cli.Application.run(Application.java:86)
	at io.github.swagger2markup.cli.Application.main(Application.java:61)

Any solutions ?

@asebold
Copy link

asebold commented Dec 5, 2019

I also ran into this error. This is a pretty big json file, so it would be helpful to know which value is causing the error. Please advise.

Exception in thread "main" java.lang.IllegalArgumentException: item must not be blank
	at org.apache.commons.lang3.Validate.notBlank(Validate.java:451)
	at io.github.swagger2markup.markup.builder.internal.AbstractMarkupDocBuilder.unorderedListItem(AbstractMarkupDocBuilder.java:333)
	at io.github.swagger2markup.markup.builder.internal.AbstractMarkupDocBuilder.unorderedList(AbstractMarkupDocBuilder.java:327)
	at io.github.swagger2markup.markup.builder.internal.asciidoc.AsciiDocBuilder.unorderedList(AsciiDocBuilder.java:140)
	at io.github.swagger2markup.internal.component.ProducesComponent.apply(ProducesComponent.java:45)
	at io.github.swagger2markup.internal.component.PathOperationComponent.buildProducesSection(PathOperationComponent.java:299)
	at io.github.swagger2markup.internal.component.PathOperationComponent.apply(PathOperationComponent.java:114)
	at io.github.swagger2markup.internal.document.PathsDocument.applyPathOperationComponent(PathsDocument.java:223)
	at io.github.swagger2markup.internal.document.PathsDocument.buildOperation(PathsDocument.java:207)
	at io.github.swagger2markup.internal.document.PathsDocument.lambda$buildsPathsSection$0(PathsDocument.java:119)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at io.github.swagger2markup.internal.document.PathsDocument.buildsPathsSection(PathsDocument.java:119)
	at io.github.swagger2markup.internal.document.PathsDocument.apply(PathsDocument.java:103)
	at io.github.swagger2markup.Swagger2MarkupConverter.applyPathsDocument(Swagger2MarkupConverter.java:197)
	at io.github.swagger2markup.Swagger2MarkupConverter.toFile(Swagger2MarkupConverter.java:240)
	at io.github.swagger2markup.cli.Application.run(Application.java:84)
	at io.github.swagger2markup.cli.Application.main(Application.java:61)

@jacksonofalltrades
Copy link

In my case, this was caused by having a custom action that does not use a standard DRF renderer to return a StreamingHttpResponse instead of something more standard like application/json so Swagger couldn't figure out the mime type of the response and it left an entry like this:
"produces": [""]

The swagger2markup tool did not like this so it bailed. I fixed this by manually changing the above to just read:
"produces": []

But probably it is better to specify the actual mimetype you expect to return in your response.

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

4 participants