-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
Add option to preserve schema case in id #209
Comments
What benefit does this proposed change bring? |
We wish to link from other automatically generated content based on the OpenAPI definition (related tutorials, SDK doc, release notes, audit reports, etc) to shins output, and it is 1) inconvenient to have to transform identifiers and 2) yields links that are easier to read and therefore easier to visually verify. #schemaexternalaccounttransfer is much harder (for me, at least) to read/verify than #schema_externalAccountTransfer. |
I notice that the output examples don't accurately represent both attribute names, nor enum values. For example, depending on the language tab, but let's take javascript, proto_buf attribute some_field will generate openAPI some_field (swagger) gets turned into somefield in examples where generated javascript will be someField. Underscores preserved in enums are removed in examples. SOME_VALUE turns into SOMEVALUE. In the same generated markdown file I have both: and ) I dropped a sample |
@ehallander9591 The language tab settings in your YAML front-matter look wrong: ---
title: davinci/service/route/grpc/Routing.proto
language_tabs:
- '''go': Go'
- '''javascript--nodejs': Node.JS'
- '''http': HTTP'
- '''javascript': JavaScript'
toc_footers: []
includes: []
search: false
highlight_theme: darkula
headingLevel: 2
--- There are extra single quotation marks which should not be there. Can you try removing them and see what happens? |
Should be fixed in version |
widdershins normalizes each schema name to lowercase when generating ids.
/components/schemas/abcDef
results inNote: case is already preserved for
operationId
:operationId: createResource
results inDescribe the solution you'd like
Add an option
options.preserveSchemaCase
. The default would be false, so as to not break existing deployments which have bookmarks in external doc to#schemaabcdef
.Preferable: add an
_
or other character before the schema name, to id strings are more legibleThe text was updated successfully, but these errors were encountered: