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

Only include endpoint path in <summary> #1446

Merged
merged 2 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions assets/scss/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,20 @@ footer {
/* Styles for sections that are rendered from data, such as HTTP APIs and event schemas */
.rendered-data {
background-color: $secondary-lightest-background;
padding: 1rem;
margin: 1rem 0;
padding: 0.85rem;
margin: 0.85rem 0;

details {
summary {
padding: .5rem 0;
p {
max-width: 80%;
h1 {
margin: 0;
/* Ensure the disclosure control is vertically centred with the header text. */
vertical-align: middle;
}
Comment on lines +296 to 300
Copy link
Member

Choose a reason for hiding this comment

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

I guess this relies on the first line of the summary being an <h1>, but that's probably an assumption we can live with.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could maybe do summary > * or summary > :first-child if this bites us in the future/

}
p {
max-width: 80%;
}
}

.deprecated-inline {
Expand Down
1 change: 1 addition & 0 deletions changelogs/internal/newsfragments/1446.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Endpoint disclosures now hide everything but the URL.
2 changes: 1 addition & 1 deletion layouts/partials/openapi/render-operation.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ <h1 id="{{ lower $method }}{{ $anchor }}">
<span class="http-api-method {{ $method }}">{{ $method }}</span>
<span class="endpoint{{ if $operation_data.deprecated }} deprecated-inline{{ end }}">{{ $endpoint }}</span>
</h1>
</summary>

<hr/>

Expand All @@ -49,7 +50,6 @@ <h1 id="{{ lower $method }}{{ $anchor }}">

<p>{{ $operation_data.description | markdownify }}</p>

</summary>

<table class="basic-info">
<tr>
Expand Down